ezp
Loading...
Searching...
No Matches
ezp::blacs_context< IT > Class Template Referencefinal
Collaboration diagram for ezp::blacs_context< IT >:
[legend]

Public Member Functions

 blacs_context (const char order)
 
 blacs_context (const IT rows, const IT cols, const char order='R')
 
 blacs_context (const blacs_context &)=delete
 
 blacs_context (blacs_context &&) noexcept=delete
 
blacs_contextoperator= (const blacs_context &)=delete
 
blacs_contextoperator= (blacs_context &&) noexcept=delete
 
auto desc_g (const IT num_rows, const IT num_cols)
 Generates a descriptor for a global matrix.
 
auto desc_l (const IT num_rows, const IT num_cols, const IT row_block, const IT col_block, const IT lead)
 Generates a descriptor for a local matrix.
 
auto desc_l (const IT num_rows, const IT num_cols, const IT block, const IT lead)
 
template<data_t DT>
auto scatter (const full_mat< DT, IT > &A, const desc< IT > &desc_a, std::vector< DT > &B, const desc< IT > &desc_b)
 
template<data_t DT>
auto gather (const std::vector< DT > &A, const desc< IT > &desc_a, const full_mat< DT, IT > &B, const desc< IT > &desc_b)
 
bool is_valid () const
 
auto row_block (const IT n) const
 Computes the row block size.
 
auto col_block (const IT n) const
 Computes the column block size.
 
auto rows (const IT n, const IT nb) const
 Computes the number of local rows of the current process.
 
auto cols (const IT n, const IT nb) const
 Computes the number of local columns of the current process.
 
IT amx (IT number) const
 Perform the global amx operation.
 
IT amn (IT number) const
 Perform the global amn operation.
 

Public Attributes

IT n_rows
 
IT n_cols
 
IT context {-1}
 
IT rank {-1}
 
IT size {-1}
 
IT my_row {-1}
 
IT my_col {-1}
 

Member Function Documentation

◆ amn()

template<index_t IT>
IT ezp::blacs_context< IT >::amn ( IT  number) const
inline

Perform the global amn operation.

This function takes an integer number, which may be different on each process, and computes the minimum value across all processes. The result is broadcast to all processes.

For example, if the input number is 0, 1, 2, 3 on four processes, this function will return 0 on all processes.

Parameters
numberThe integer number to be updated.
Returns
The updated integer number.

◆ amx()

template<index_t IT>
IT ezp::blacs_context< IT >::amx ( IT  number) const
inline

Perform the global amx operation.

This function takes an integer number, which may be different on each process, and computes the maximum value across all processes. The result is broadcast to all processes.

For example, if the input number is 0, 1, 2, 3 on four processes, this function will return 3 on all processes.

Parameters
numberThe integer number to be updated.
Returns
The updated integer number.

◆ cols()

template<index_t IT>
auto ezp::blacs_context< IT >::cols ( const IT  n,
const IT  nb 
) const
inline

Computes the number of local columns of the current process.

This function calculates the number of columns of the current process in a distributed matrix using the numroc function.

Parameters
nThe total number of columns in the global matrix.
nbThe block size used for the distribution.
Returns
The number of local columns of the calling process.

◆ desc_g()

template<index_t IT>
auto ezp::blacs_context< IT >::desc_g ( const IT  num_rows,
const IT  num_cols 
)
inline

Generates a descriptor for a global matrix.

This function initializes and returns a descriptor for a global matrix with the specified number of rows and columns.

Template Parameters
ITThe integer type used for matrix dimensions.
Parameters
num_rowsThe number of rows in the global matrix.
num_colsThe number of columns in the global matrix.
Returns
A descriptor for the global matrix.

◆ desc_l()

template<index_t IT>
auto ezp::blacs_context< IT >::desc_l ( const IT  num_rows,
const IT  num_cols,
const IT  row_block,
const IT  col_block,
const IT  lead 
)
inline

Generates a descriptor for a local matrix.

This function initializes a descriptor for a local matrix with the given dimensions and block sizes.

Template Parameters
ITThe integer type used for matrix dimensions and block sizes.
Parameters
num_rowsThe number of rows in the global matrix.
num_colsThe number of columns in the global matrix.
row_blockThe block size in the row dimension.
col_blockThe block size in the column dimension.
leadThe leading dimension of the local matrix.
Returns
A descriptor for the local matrix.
Here is the call graph for this function:

◆ rows()

template<index_t IT>
auto ezp::blacs_context< IT >::rows ( const IT  n,
const IT  nb 
) const
inline

Computes the number of local rows of the current process.

This function calculates the number of rows of the current process in a distributed matrix using the numroc function.

Parameters
nThe total number of rows in the global matrix.
nbThe block size used for the distribution.
Returns
The number of local rows of the current process.

The documentation for this class was generated from the following file: