Provides a consistent wrapper to different matrix multiply implementations
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(matrix_multiply_method_type), | public, | parameter | :: | matmul_lapack | = | matrix_multiply_method_type(flag=1, name='Lapack') |
Method calling blas' gemm directly |
type(matrix_multiply_method_type), | public, | parameter | :: | matmul_intrinsic | = | matrix_multiply_method_type(flag=2, name='Intrinsic') |
Method simply calling intrinsic matmul |
type(matrix_multiply_method_type), | public, | parameter | :: | matmul_custom | = | matrix_multiply_method_type(flag=3, name='Custom') |
Method using explicit loops with OpenMP parallelisation. Could do with a better name. |
type(matrix_multiply_method_type), | public, | parameter, dimension(*) | :: | multiply_methods | = | [matmul_intrinsic, matmul_custom] |
Array of all available methods |
type(matrix_multiply_method_type), | private | :: | matmul_default_method | = | matmul_intrinsic |
Used to store the default method to use if not passed to matmul_wrapper. This way we can override the default (e.g. after timing performance) whilst still having a reasonable default |
Provides a wrapper to different matrix multiplication methods
Wrapper to complex matrix multiplication with two 2D matrices
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :) | :: | a | ||
complex, | intent(in), | dimension(:, :) | :: | b | ||
type(matrix_multiply_method_type), | intent(in), | optional | :: | method |
A simple wrapper type around an integer to represent different multiply methods.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | flag | = | 0 | ||
character(len=16), | private | :: | name | = | "UNSET NAME" |
procedure , public :: get_flag => matrix_multiply_method_get_flag Function | |
procedure , public :: get_name => matrix_multiply_method_get_name Function |
Helper routine to get access to the matrix_multiply_method's flag in a read-only way. Primarily used for testing.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix_multiply_method_type), | intent(in) | :: | self |
Helper routine to get access to the matrix_multiply_method's name in a read-only way. Primarily used for testing.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(matrix_multiply_method_type), | intent(in) | :: | self |
Times each available method for the given problem size and returns the flag of the fastest one.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | trial_size | |||
integer, | intent(in), | optional | :: | repeats | ||
logical, | intent(in), | optional | :: | display_times |
Wrapper to complex matrix multiplication with two 2D matrices
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :) | :: | a | ||
complex, | intent(in), | dimension(:, :) | :: | b | ||
type(matrix_multiply_method_type), | intent(in), | optional | :: | method |