![]() |
(git:d18deda)
|
Represents a complex full matrix distributed on many processors. More...
Data Types | |
type | copy_cfm_info_type |
Stores the state of a copy between cp_cfm_start_copy_general and cp_cfm_finish_copy_general. More... | |
type | cp_cfm_p_type |
Just to build arrays of pointers to matrices. More... | |
interface | cp_cfm_to_cfm |
type | cp_cfm_type |
Represent a complex full matrix. More... | |
Functions/Subroutines | |
subroutine, public | cp_cfm_create (matrix, matrix_struct, name) |
Creates a new full matrix with the given structure. | |
subroutine, public | cp_cfm_release (matrix) |
Releases a full matrix. | |
subroutine, public | cp_cfm_set_all (matrix, alpha, beta) |
Set all elements of the full matrix to alpha. Besides, set all diagonal matrix elements to beta (if given explicitly). | |
subroutine, public | cp_cfm_get_element (matrix, irow_global, icol_global, alpha) |
Get the matrix element by its global index. | |
subroutine, public | cp_cfm_set_element (matrix, irow_global, icol_global, alpha) |
Set the matrix element (irow_global,icol_global) of the full matrix to alpha. | |
subroutine, public | cp_cfm_get_submatrix (fm, target_m, start_row, start_col, n_rows, n_cols, transpose) |
Extract a sub-matrix from the full matrix: op(target_m)(1:n_rows,1:n_cols) = fm(start_row:start_row+n_rows,start_col:start_col+n_cols). Sub-matrix 'target_m' is replicated on each CPU. Using this call is expensive. | |
subroutine, public | cp_cfm_set_submatrix (matrix, new_values, start_row, start_col, n_rows, n_cols, alpha, beta, transpose) |
Set a sub-matrix of the full matrix: matrix(start_row:start_row+n_rows,start_col:start_col+n_cols) = alpha*op(new_values)(1:n_rows,1:n_cols) + beta*matrix(start_row:start_row+n_rows,start_col:start_col+n_cols) | |
subroutine, public | cp_cfm_get_info (matrix, name, nrow_global, ncol_global, nrow_block, ncol_block, nrow_local, ncol_local, row_indices, col_indices, local_data, context, matrix_struct, para_env) |
Returns information about a full matrix. | |
subroutine, public | cp_cfm_to_fm (msource, mtargetr, mtargeti) |
Copy real and imaginary parts of a complex full matrix into separate real-value full matrices. | |
subroutine, public | cp_fm_to_cfm (msourcer, msourcei, mtarget) |
Construct a complex full matrix by taking its real and imaginary parts from two separate real-value full matrices. | |
subroutine, public | cp_cfm_start_copy_general (source, destination, para_env, info) |
Initiate the copy operation: get distribution data, post MPI isend and irecvs. | |
subroutine, public | cp_cfm_finish_copy_general (destination, info) |
Complete the copy operation: wait for comms, unpack, clean up MPI state. | |
subroutine, public | cp_cfm_cleanup_copy_general (info) |
Complete the copy operation: wait for comms clean up MPI state. | |
Represents a complex full matrix distributed on many processors.
subroutine, public cp_cfm_types::cp_cfm_create | ( | type(cp_cfm_type), intent(out) | matrix, |
type(cp_fm_struct_type), intent(in), target | matrix_struct, | ||
character(len=*), intent(in), optional | name | ||
) |
Creates a new full matrix with the given structure.
matrix | matrix to be created |
matrix_struct | structure of the matrix |
name | name of the matrix |
Definition at line 120 of file cp_cfm_types.F.
subroutine, public cp_cfm_types::cp_cfm_release | ( | type(cp_cfm_type), intent(inout) | matrix | ) |
Releases a full matrix.
matrix | the matrix to release |
Definition at line 154 of file cp_cfm_types.F.
subroutine, public cp_cfm_types::cp_cfm_set_all | ( | type(cp_cfm_type), intent(in) | matrix, |
complex(kind=dp), intent(in) | alpha, | ||
complex(kind=dp), intent(in), optional | beta | ||
) |
Set all elements of the full matrix to alpha. Besides, set all diagonal matrix elements to beta (if given explicitly).
matrix | matrix to initialise |
alpha | value of off-diagonal matrix elements |
beta | value of diagonal matrix elements (equal to alpha if absent) |
Definition at line 174 of file cp_cfm_types.F.
subroutine, public cp_cfm_types::cp_cfm_get_element | ( | type(cp_cfm_type), intent(in) | matrix, |
integer, intent(in) | irow_global, | ||
integer, intent(in) | icol_global, | ||
complex(kind=dp), intent(out) | alpha | ||
) |
Get the matrix element by its global index.
matrix | full matrix |
irow_global | global row index |
icol_global | global column index |
alpha | matrix element |
Definition at line 227 of file cp_cfm_types.F.
subroutine, public cp_cfm_types::cp_cfm_set_element | ( | type(cp_cfm_type), intent(in) | matrix, |
integer, intent(in) | irow_global, | ||
integer, intent(in) | icol_global, | ||
complex(kind=dp), intent(in) | alpha | ||
) |
Set the matrix element (irow_global,icol_global) of the full matrix to alpha.
matrix | full matrix |
irow_global | global row index |
icol_global | global column index |
alpha | value of the matrix element |
Definition at line 274 of file cp_cfm_types.F.
subroutine, public cp_cfm_types::cp_cfm_get_submatrix | ( | type(cp_cfm_type), intent(in) | fm, |
complex(kind=dp), dimension(:, :), intent(out) | target_m, | ||
integer, intent(in), optional | start_row, | ||
integer, intent(in), optional | start_col, | ||
integer, intent(in), optional | n_rows, | ||
integer, intent(in), optional | n_cols, | ||
logical, intent(in), optional | transpose | ||
) |
Extract a sub-matrix from the full matrix: op(target_m)(1:n_rows,1:n_cols) = fm(start_row:start_row+n_rows,start_col:start_col+n_cols). Sub-matrix 'target_m' is replicated on each CPU. Using this call is expensive.
fm | full matrix you want to get the elements from |
target_m | 2-D array to store the extracted sub-matrix |
start_row | global row index of the matrix element target_m(1,1) (defaults to 1) |
start_col | global column index of the matrix element target_m(1,1) (defaults to 1) |
n_rows | number of rows to extract (defaults to size(op(target_m),1)) |
n_cols | number of columns to extract (defaults to size(op(target_m),2)) |
transpose | indicates that the extracted sub-matrix target_m should be transposed: op(target_m) = target_m^T if .TRUE., op(target_m) = target_m if .FALSE. (defaults to false) |
Definition at line 328 of file cp_cfm_types.F.
subroutine, public cp_cfm_types::cp_cfm_set_submatrix | ( | type(cp_cfm_type), intent(in) | matrix, |
complex(kind=dp), dimension(:, :), intent(in) | new_values, | ||
integer, intent(in), optional | start_row, | ||
integer, intent(in), optional | start_col, | ||
integer, intent(in), optional | n_rows, | ||
integer, intent(in), optional | n_cols, | ||
complex(kind=dp), intent(in), optional | alpha, | ||
complex(kind=dp), intent(in), optional | beta, | ||
logical, intent(in), optional | transpose | ||
) |
Set a sub-matrix of the full matrix: matrix(start_row:start_row+n_rows,start_col:start_col+n_cols) = alpha*op(new_values)(1:n_rows,1:n_cols) + beta*matrix(start_row:start_row+n_rows,start_col:start_col+n_cols)
matrix | full to update |
new_values | replicated 2-D array that holds new elements of the updated sub-matrix |
start_row | global row index of the matrix element new_values(1,1) (defaults to 1) |
start_col | global column index of the matrix element new_values(1,1) (defaults to 1) |
n_rows | number of rows to update (defaults to size(op(new_values),1)) |
n_cols | number of columns to update (defaults to size(op(new_values),2)) |
alpha | scale factor for the new values (defaults to (1.0,0.0)) |
beta | scale factor for the old values (defaults to (0.0,0.0)) |
transpose | indicates that the matrix new_values should be transposed: op(new_values) = new_values^T if .TRUE., op(new_values) = new_values if .FALSE. (defaults to false) |
Definition at line 464 of file cp_cfm_types.F.
subroutine, public cp_cfm_types::cp_cfm_get_info | ( | type(cp_cfm_type), intent(in) | matrix, |
character(len=*), intent(out), optional | name, | ||
integer, intent(out), optional | nrow_global, | ||
integer, intent(out), optional | ncol_global, | ||
integer, intent(out), optional | nrow_block, | ||
integer, intent(out), optional | ncol_block, | ||
integer, intent(out), optional | nrow_local, | ||
integer, intent(out), optional | ncol_local, | ||
integer, dimension(:), optional, pointer | row_indices, | ||
integer, dimension(:), optional, pointer | col_indices, | ||
complex(kind=dp), dimension(:, :), optional, pointer, contiguous | local_data, | ||
type(cp_blacs_env_type), optional, pointer | context, | ||
type(cp_fm_struct_type), optional, pointer | matrix_struct, | ||
type(mp_para_env_type), optional, pointer | para_env | ||
) |
Returns information about a full matrix.
matrix | matrix |
name | name of the matrix |
nrow_global | total number of rows |
ncol_global | total number of columns |
nrow_block | number of rows per ScaLAPACK block |
ncol_block | number of columns per ScaLAPACK block |
nrow_local | number of locally stored rows |
ncol_local | number of locally stored columns |
row_indices | global indices of locally stored rows |
col_indices | global indices of locally stored columns |
local_data | locally stored matrix elements |
context | BLACS context |
matrix_struct | matrix structure |
para_env | parallel environment |
Definition at line 599 of file cp_cfm_types.F.
subroutine, public cp_cfm_types::cp_cfm_to_fm | ( | type(cp_cfm_type), intent(in) | msource, |
type(cp_fm_type), intent(in), optional | mtargetr, | ||
type(cp_fm_type), intent(in), optional | mtargeti | ||
) |
Copy real and imaginary parts of a complex full matrix into separate real-value full matrices.
msource | complex matrix |
mtargetr | (optional) real part of the source matrix |
mtargeti | (optional) imaginary part of the source matrix |
Definition at line 760 of file cp_cfm_types.F.
subroutine, public cp_cfm_types::cp_fm_to_cfm | ( | type(cp_fm_type), intent(in), optional | msourcer, |
type(cp_fm_type), intent(in), optional | msourcei, | ||
type(cp_cfm_type), intent(in) | mtarget | ||
) |
Construct a complex full matrix by taking its real and imaginary parts from two separate real-value full matrices.
msourcer | (optional) real part of the complex matrix (defaults to 0.0) |
msourcei | (optional) imaginary part of the complex matrix (defaults to 0.0) |
mtarget | resulting complex matrix |
Definition at line 812 of file cp_cfm_types.F.
subroutine, public cp_cfm_types::cp_cfm_start_copy_general | ( | type(cp_cfm_type), intent(in) | source, |
type(cp_cfm_type), intent(in) | destination, | ||
type(mp_para_env_type), intent(in), pointer | para_env, | ||
type(copy_cfm_info_type), intent(out) | info | ||
) |
Initiate the copy operation: get distribution data, post MPI isend and irecvs.
source | input complex-valued fm matrix |
destination | output complex-valued fm matrix |
para_env | parallel environment corresponding to the BLACS env that covers all parts of the input and output matrices |
info | all of the data that will be needed to complete the copy operation |
Definition at line 874 of file cp_cfm_types.F.
subroutine, public cp_cfm_types::cp_cfm_finish_copy_general | ( | type(cp_cfm_type), intent(in) | destination, |
type(copy_cfm_info_type), intent(inout) | info | ||
) |
Complete the copy operation: wait for comms, unpack, clean up MPI state.
destination | output cfm matrix |
info | all of the data that will be needed to complete the copy operation |
Definition at line 1186 of file cp_cfm_types.F.
subroutine, public cp_cfm_types::cp_cfm_cleanup_copy_general | ( | type(copy_cfm_info_type), intent(inout) | info | ) |
Complete the copy operation: wait for comms clean up MPI state.
info | all of the data that will be needed to complete the copy operation |
Definition at line 1253 of file cp_cfm_types.F.