reshape_mm_compatible Subroutine

private subroutine reshape_mm_compatible(matrix1_in, matrix2_in, matrix1_out, matrix2_out, new1, new2, trans1, trans2, optimize_dist, nsplit, opt_nsplit, split_rc_1, split_rc_2, nodata1, nodata2, move_data_1, move_data_2, comm_new, unit_nr)

Reshape either matrix1 or matrix2 to make sure that their process grids are compatible with the same split factor.

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_tas_type), intent(inout), TARGET:: matrix1_in
type(dbcsr_tas_type), intent(inout), TARGET:: matrix2_in
type(dbcsr_tas_type), intent(out), POINTER:: matrix1_out
type(dbcsr_tas_type), intent(out), POINTER:: matrix2_out
logical, intent(out) :: new1

Whether matrix1_out is a new matrix or simply pointing to matrix1_in Whether matrix2_out is a new matrix or simply pointing to matrix2_in

logical, intent(out) :: new2

Whether matrix1_out is a new matrix or simply pointing to matrix1_in Whether matrix2_out is a new matrix or simply pointing to matrix2_in

character(len=1), intent(inout) :: trans1

transpose flag of matrix1_in for multiplication transpose flag of matrix2_in for multiplication

character(len=1), intent(inout) :: trans2

transpose flag of matrix1_in for multiplication transpose flag of matrix2_in for multiplication

logical, intent(in), optional :: optimize_dist

experimental: optimize matrix splitting and distribution

integer, intent(in), optional :: nsplit

Optimal split factor (set to 0 if split factor should not be changed)

logical, intent(in), optional :: opt_nsplit
integer, intent(inout) :: split_rc_1

Whether to split rows or columns for matrix 1 Whether to split rows or columns for matrix 2

integer, intent(inout) :: split_rc_2

Whether to split rows or columns for matrix 1 Whether to split rows or columns for matrix 2

logical, intent(in), optional :: nodata1

Don't copy matrix data from matrix1_in to matrix1_out Don't copy matrix data from matrix2_in to matrix2_out

logical, intent(in), optional :: nodata2

Don't copy matrix data from matrix1_in to matrix1_out Don't copy matrix data from matrix2_in to matrix2_out

logical, intent(inout), optional :: move_data_1

memory optimization: move data such that matrix1_in may be empty on return. memory optimization: move data such that matrix2_in may be empty on return.

logical, intent(inout), optional :: move_data_2

memory optimization: move data such that matrix1_in may be empty on return. memory optimization: move data such that matrix2_in may be empty on return.

integer, intent(out), optional :: comm_new

returns the new communicator only if optimize_dist

integer, intent(in), optional :: unit_nr

output unit


Contents

None