dbcsr_mm_hostdrv Module

Stacks of small matrix multiplications



Variables

Type Visibility Attributes Name Initial
character(len=*), private, parameter :: moduleN = 'dbcsr_mm_hostdrv'
character(len=*), private, parameter :: int_print = "(10(1X,I7))"
logical, private, parameter :: debug_mod = .FALSE.
logical, private, parameter :: careful_mod = .FALSE.

Derived Types

type, public ::  dbcsr_mm_hostdrv_type

Components

Type Visibility Attributes Name Initial
type(dbcsr_data_obj), public :: data_area = dbcsr_data_obj()

Subroutines

public subroutine dbcsr_mm_hostdrv_lib_init()

Initialize the library

Arguments

None

public subroutine dbcsr_mm_hostdrv_lib_finalize()

Finalize the library

Arguments

None

public subroutine dbcsr_mm_hostdrv_init(this, product_wm)

Initialize the library

Arguments

Type IntentOptional Attributes Name
type(dbcsr_mm_hostdrv_type), intent(inout) :: this
type(dbcsr_work_type), POINTER :: product_wm

public subroutine dbcsr_mm_hostdrv_process(this, left, right, params, stack_size, stack_descr, success, used_smm)

Calls the various drivers that process the stack.

Arguments

Type IntentOptional Attributes Name
type(dbcsr_mm_hostdrv_type), intent(inout) :: this
type(dbcsr_type), intent(in) :: left

Left-matrix data Right-matrix data

type(dbcsr_type), intent(in) :: right

Left-matrix data Right-matrix data

integer, intent(inout), DIMENSION(1:dbcsr_ps_width, stack_size) :: params

Stack of GEMM parameters

integer, intent(in) :: stack_size
type(stack_descriptor_type), intent(in) :: stack_descr
logical, intent(out) :: success
logical, intent(out) :: used_smm

private subroutine print_gemm_parameters(params)

Helper-routine used by dbcsr_mm_hostdrv_process to print debug info.

Arguments

Type IntentOptional Attributes Name
integer, intent(in), DIMENSION(:, :) :: params

private subroutine blas_process_mm_stack_d(params, stack_size, a_data, b_data, c_data)

Processes MM stack and issues BLAS xGEMM calls

Arguments

Type IntentOptional Attributes Name
integer, intent(in), DIMENSION(dbcsr_ps_width, 1:stack_size) :: params

Stack of MM parameters

integer, intent(in) :: stack_size

Number of parameters

real(kind=real_8), intent(in), DIMENSION(*) :: a_data

Left-matrix data Right-matrix data

real(kind=real_8), intent(in), DIMENSION(*) :: b_data

Left-matrix data Right-matrix data

real(kind=real_8), intent(inout), DIMENSION(*) :: c_data

Product data

private subroutine internal_process_mm_stack_d(params, stack_size, a_data, b_data, c_data)

Processes MM stack and issues internal MM calls.

Arguments

Type IntentOptional Attributes Name
integer, intent(in), DIMENSION(dbcsr_ps_width, 1:stack_size) :: params

Stack of MM parameters

integer, intent(in) :: stack_size

Number of parameters

real(kind=real_8), intent(in), DIMENSION(*) :: a_data

Left-matrix data Right-matrix data

real(kind=real_8), intent(in), DIMENSION(*) :: b_data

Left-matrix data Right-matrix data

real(kind=real_8), intent(inout), DIMENSION(*) :: c_data

Product data

private subroutine smm_process_mm_stack_d(stack_descr, params, stack_size, a_data, b_data, c_data, used_smm)

Processes MM stack and issues SMM library calls

Arguments

Type IntentOptional Attributes Name
type(stack_descriptor_type), intent(in) :: stack_descr
integer, intent(in), DIMENSION(dbcsr_ps_width, 1:stack_size) :: params

Stack of MM parameters

integer, intent(in) :: stack_size

Number of parameters

real(kind=real_8), intent(in), DIMENSION(*) :: a_data

Left-matrix data Right-matrix data

real(kind=real_8), intent(in), DIMENSION(*) :: b_data

Left-matrix data Right-matrix data

real(kind=real_8), intent(inout), DIMENSION(*) :: c_data

Product data

logical, intent(out) :: used_smm

private pure subroutine internal_mm_d_nn(M, N, K, A, B, C)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: M
integer, intent(in) :: N
integer, intent(in) :: K
real(kind=real_8), intent(in) :: A(M,K)
real(kind=real_8), intent(in) :: B(K,N)
real(kind=real_8), intent(inout) :: C(M,N)

private subroutine blas_process_mm_stack_s(params, stack_size, a_data, b_data, c_data)

Processes MM stack and issues BLAS xGEMM calls

Arguments

Type IntentOptional Attributes Name
integer, intent(in), DIMENSION(dbcsr_ps_width, 1:stack_size) :: params

Stack of MM parameters

integer, intent(in) :: stack_size

Number of parameters

real(kind=real_4), intent(in), DIMENSION(*) :: a_data

Left-matrix data Right-matrix data

real(kind=real_4), intent(in), DIMENSION(*) :: b_data

Left-matrix data Right-matrix data

real(kind=real_4), intent(inout), DIMENSION(*) :: c_data

Product data

private subroutine internal_process_mm_stack_s(params, stack_size, a_data, b_data, c_data)

Processes MM stack and issues internal MM calls.

Arguments

Type IntentOptional Attributes Name
integer, intent(in), DIMENSION(dbcsr_ps_width, 1:stack_size) :: params

Stack of MM parameters

integer, intent(in) :: stack_size

Number of parameters

real(kind=real_4), intent(in), DIMENSION(*) :: a_data

Left-matrix data Right-matrix data

real(kind=real_4), intent(in), DIMENSION(*) :: b_data

Left-matrix data Right-matrix data

real(kind=real_4), intent(inout), DIMENSION(*) :: c_data

Product data

private subroutine smm_process_mm_stack_s(stack_descr, params, stack_size, a_data, b_data, c_data, used_smm)

Processes MM stack and issues SMM library calls

Arguments

Type IntentOptional Attributes Name
type(stack_descriptor_type), intent(in) :: stack_descr
integer, intent(in), DIMENSION(dbcsr_ps_width, 1:stack_size) :: params

Stack of MM parameters

integer, intent(in) :: stack_size

Number of parameters

real(kind=real_4), intent(in), DIMENSION(*) :: a_data

Left-matrix data Right-matrix data

real(kind=real_4), intent(in), DIMENSION(*) :: b_data

Left-matrix data Right-matrix data

real(kind=real_4), intent(inout), DIMENSION(*) :: c_data

Product data

logical, intent(out) :: used_smm

private pure subroutine internal_mm_s_nn(M, N, K, A, B, C)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: M
integer, intent(in) :: N
integer, intent(in) :: K
real(kind=real_4), intent(in) :: A(M,K)
real(kind=real_4), intent(in) :: B(K,N)
real(kind=real_4), intent(inout) :: C(M,N)

private subroutine blas_process_mm_stack_z(params, stack_size, a_data, b_data, c_data)

Processes MM stack and issues BLAS xGEMM calls

Arguments

Type IntentOptional Attributes Name
integer, intent(in), DIMENSION(dbcsr_ps_width, 1:stack_size) :: params

Stack of MM parameters

integer, intent(in) :: stack_size

Number of parameters

complex(kind=real_8), intent(in), DIMENSION(*) :: a_data

Left-matrix data Right-matrix data

complex(kind=real_8), intent(in), DIMENSION(*) :: b_data

Left-matrix data Right-matrix data

complex(kind=real_8), intent(inout), DIMENSION(*) :: c_data

Product data

private subroutine internal_process_mm_stack_z(params, stack_size, a_data, b_data, c_data)

Processes MM stack and issues internal MM calls.

Arguments

Type IntentOptional Attributes Name
integer, intent(in), DIMENSION(dbcsr_ps_width, 1:stack_size) :: params

Stack of MM parameters

integer, intent(in) :: stack_size

Number of parameters

complex(kind=real_8), intent(in), DIMENSION(*) :: a_data

Left-matrix data Right-matrix data

complex(kind=real_8), intent(in), DIMENSION(*) :: b_data

Left-matrix data Right-matrix data

complex(kind=real_8), intent(inout), DIMENSION(*) :: c_data

Product data

private subroutine smm_process_mm_stack_z(stack_descr, params, stack_size, a_data, b_data, c_data, used_smm)

Processes MM stack and issues SMM library calls

Arguments

Type IntentOptional Attributes Name
type(stack_descriptor_type), intent(in) :: stack_descr
integer, intent(in), DIMENSION(dbcsr_ps_width, 1:stack_size) :: params

Stack of MM parameters

integer, intent(in) :: stack_size

Number of parameters

complex(kind=real_8), intent(in), DIMENSION(*) :: a_data

Left-matrix data Right-matrix data

complex(kind=real_8), intent(in), DIMENSION(*) :: b_data

Left-matrix data Right-matrix data

complex(kind=real_8), intent(inout), DIMENSION(*) :: c_data

Product data

logical, intent(out) :: used_smm

private pure subroutine internal_mm_z_nn(M, N, K, A, B, C)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: M
integer, intent(in) :: N
integer, intent(in) :: K
complex(kind=real_8), intent(in) :: A(M,K)
complex(kind=real_8), intent(in) :: B(K,N)
complex(kind=real_8), intent(inout) :: C(M,N)

private subroutine blas_process_mm_stack_c(params, stack_size, a_data, b_data, c_data)

Processes MM stack and issues BLAS xGEMM calls

Arguments

Type IntentOptional Attributes Name
integer, intent(in), DIMENSION(dbcsr_ps_width, 1:stack_size) :: params

Stack of MM parameters

integer, intent(in) :: stack_size

Number of parameters

complex(kind=real_4), intent(in), DIMENSION(*) :: a_data

Left-matrix data Right-matrix data

complex(kind=real_4), intent(in), DIMENSION(*) :: b_data

Left-matrix data Right-matrix data

complex(kind=real_4), intent(inout), DIMENSION(*) :: c_data

Product data

private subroutine internal_process_mm_stack_c(params, stack_size, a_data, b_data, c_data)

Processes MM stack and issues internal MM calls.

Arguments

Type IntentOptional Attributes Name
integer, intent(in), DIMENSION(dbcsr_ps_width, 1:stack_size) :: params

Stack of MM parameters

integer, intent(in) :: stack_size

Number of parameters

complex(kind=real_4), intent(in), DIMENSION(*) :: a_data

Left-matrix data Right-matrix data

complex(kind=real_4), intent(in), DIMENSION(*) :: b_data

Left-matrix data Right-matrix data

complex(kind=real_4), intent(inout), DIMENSION(*) :: c_data

Product data

private subroutine smm_process_mm_stack_c(stack_descr, params, stack_size, a_data, b_data, c_data, used_smm)

Processes MM stack and issues SMM library calls

Arguments

Type IntentOptional Attributes Name
type(stack_descriptor_type), intent(in) :: stack_descr
integer, intent(in), DIMENSION(dbcsr_ps_width, 1:stack_size) :: params

Stack of MM parameters

integer, intent(in) :: stack_size

Number of parameters

complex(kind=real_4), intent(in), DIMENSION(*) :: a_data

Left-matrix data Right-matrix data

complex(kind=real_4), intent(in), DIMENSION(*) :: b_data

Left-matrix data Right-matrix data

complex(kind=real_4), intent(inout), DIMENSION(*) :: c_data

Product data

logical, intent(out) :: used_smm

private pure subroutine internal_mm_c_nn(M, N, K, A, B, C)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: M
integer, intent(in) :: N
integer, intent(in) :: K
complex(kind=real_4), intent(in) :: A(M,K)
complex(kind=real_4), intent(in) :: B(K,N)
complex(kind=real_4), intent(inout) :: C(M,N)