Class Matrix
Represents a matrix and provides matrix operations.
#include <Matrix.hpp>
Public Attributes
| Type | Name |
|---|---|
| Comm & | comm |
Public Functions
| Type | Name |
|---|---|
| Matrix (Comm & comm, unsigned int cols, unsigned int rows, unsigned int block_size, bool global_sizes=false, bool QoI=false, const MatvecPrecisionConfig & p_config=MatvecPrecisionConfig()) Constructs a Matrix object. |
|
| Matrix (Comm & comm, std::string path, std::string aux_path="", bool QoI=false, const MatvecPrecisionConfig & p_config=MatvecPrecisionConfig()) Constructs a Matrix object from a meta file. |
|
| unsigned int | get_block_size () |
| int | get_checksum () |
| ComplexD * | get_col_vec_freq () |
| ComplexF * | get_col_vec_freq_F () |
| ComplexD * | get_col_vec_freq_TOSI () |
| ComplexF * | get_col_vec_freq_TOSI_F () |
| double * | get_col_vec_pad () |
| float * | get_col_vec_pad_F () |
| double * | get_col_vec_unpad () |
| float * | get_col_vec_unpad_F () |
| cufftHandle | get_forward_plan () |
| cufftHandle | get_forward_plan_conj () |
| unsigned int | get_glob_num_cols () |
| unsigned int | get_glob_num_rows () |
| cufftHandle | get_inverse_plan () |
| cufftHandle | get_inverse_plan_conj () |
| ComplexD * | get_mat_freq_TOSI () |
| ComplexF * | get_mat_freq_TOSI_F () |
| ComplexD * | get_mat_freq_TOSI_aux () |
| ComplexF * | get_mat_freq_TOSI_aux_F () |
| unsigned int | get_num_cols () |
| unsigned int | get_num_rows () |
| unsigned int | get_padded_size () |
| MatvecPrecisionConfig | get_precision_config () |
| double * | get_res_pad () |
| ComplexD * | get_row_vec_freq () |
| ComplexF * | get_row_vec_freq_F () |
| ComplexD * | get_row_vec_freq_TOSI () |
| ComplexF * | get_row_vec_freq_TOSI_F () |
| double * | get_row_vec_pad () |
| float * | get_row_vec_pad_F () |
| double * | get_row_vec_unpad () |
| float * | get_row_vec_unpad_F () |
| Vector | get_vec (std::string input_or_output) Get an input or output vector compatible with the matrix. |
| bool | has_aux_mat () |
| void | init_mat_doubles (bool aux_mat=false) Initializes the matrix with double precision floating point numbers (used for precision testing). |
| void | init_mat_from_file (std::string dirname, bool aux_mat=false) Initializes the matrix from a file. |
| void | init_mat_ones (bool aux_mat=false) Initializes the matrix with ones. |
| bool | is_initialized () |
| bool | is_p2q_mat () |
| void | matvec (Vector & x, Vector & y, bool use_aux_mat=false, bool full=false) Performs matrix-vector multiplication. |
| void | transpose_matvec (Vector & x, Vector & y, bool use_aux_mat=false, bool full=false) Performs conjugate transpose matrix-vector multiplication. |
| ~Matrix () Destroys the Matrix object. Frees the memory allocated for the matrix data. |
Public Attributes Documentation
variable comm
Reference to the communication object.
Public Functions Documentation
function Matrix [1/2]
Constructs a Matrix object.
Matrix::Matrix (
Comm & comm,
unsigned int cols,
unsigned int rows,
unsigned int block_size,
bool global_sizes=false,
bool QoI=false,
const MatvecPrecisionConfig & p_config=MatvecPrecisionConfig()
)
Parameters:
commThe communication object (passed as reference).colsThe number of columns in the matrix (local or global based on value of global_sizes).rowsThe number of rows in the matrix (local or global based on value of global_sizes).block_sizeThe block size of the matrix without padding.global_sizesFlag indicating whether the sizes are global.QoIFlag indicating if the matrix is the p2q map instead of the p2o map.p_configThe precision configuration for matrix-vector operations.
function Matrix [2/2]
Constructs a Matrix object from a meta file.
Matrix::Matrix (
Comm & comm,
std::string path,
std::string aux_path="",
bool QoI=false,
const MatvecPrecisionConfig & p_config=MatvecPrecisionConfig()
)
Parameters:
commThe communication object (passed as reference).pathPath to the directory containing the matrix data.aux_pathPath to the directory containing the auxiliary matrix data. Cannot be nonempty if path is empty.QoIFlag indicating if the matrix is the p2q map instead of the p2o map.p_configThe precision configuration for matrix-vector operations.
function get_block_size
Returns the unpadded block size of the matrix.
function get_checksum
Returns the checksum for the matrix.
function get_col_vec_freq
Returns the column vector frequency.
function get_col_vec_freq_F
Returns the column vector frequency (float).
function get_col_vec_freq_TOSI
Returns the column vector frequency in TOSI format.
function get_col_vec_freq_TOSI_F
Returns the column vector frequency in TOSI format (float).
function get_col_vec_pad
Returns the padded column vector.
function get_col_vec_pad_F
Returns the padded column vector (float).
function get_col_vec_unpad
Returns the unpadded column vector.
function get_col_vec_unpad_F
Returns the unpadded column vector (float).
function get_forward_plan
Returns the forward plan for FFT.
function get_forward_plan_conj
Returns the forward plan for conjugate FFT.
function get_glob_num_cols
Returns the global number of columns in the matrix.
function get_glob_num_rows
Returns the global number of rows in the matrix.
function get_inverse_plan
Returns the inverse plan for FFT.
function get_inverse_plan_conj
Returns the inverse plan for conjugate FFT.
function get_mat_freq_TOSI
Returns the matrix frequency in TOSI format.
function get_mat_freq_TOSI_F
Returns the matrix frequency in TOSI format (float).
function get_mat_freq_TOSI_aux
Returns the other matrix frequency in TOSI format.
function get_mat_freq_TOSI_aux_F
Returns the other matrix frequency in TOSI format (float).
function get_num_cols
Returns the number of columns in the matrix.
function get_num_rows
Returns the number of rows in the matrix.
function get_padded_size
Returns the padded block size of the matrix.
function get_precision_config
Returns the precision configuration for matrix-vector operations.
function get_res_pad
Returns the padded result vector.
function get_row_vec_freq
Returns the row vector frequency.
function get_row_vec_freq_F
Returns the row vector frequency (float).
function get_row_vec_freq_TOSI
Returns the row vector frequency in TOSI format.
function get_row_vec_freq_TOSI_F
Returns the row vector frequency in TOSI format (float).
function get_row_vec_pad
Returns the padded row vector.
function get_row_vec_pad_F
Returns the padded row vector (float).
function get_row_vec_unpad
Returns the unpadded row vector.
function get_row_vec_unpad_F
Returns the unpadded row vector (float).
function get_vec
Get an input or output vector compatible with the matrix.
Parameters:
input_or_outputThe string "input" or "output". In the expression y = Fx, y is the output, and x is the input. x will have size glob_num_cols * block_size, and y will have size glob_num_rows * block_size.
Returns:
The input or output vector.
function has_aux_mat
Returns true if the other matrix frequency in TOSI format exists (and is initialized), false otherwise.
function init_mat_doubles
Initializes the matrix with double precision floating point numbers (used for precision testing).
Parameters:
aux_matFlag indicating if the matrix to be initialized is the auxiliary matrix. The
function init_mat_from_file
Initializes the matrix from a file.
Parameters:
dirnameThe path to the directory containing the adjoint vectors.aux_matFlag indicating if the matrix to be initialized is the auxiliary matrix. The primary matrix must be initialized first.
function init_mat_ones
Initializes the matrix with ones.
Parameters:
aux_matFlag indicating if the matrix to be initialized is the auxiliary matrix. The primary matrix must be initialized first.
function is_initialized
Returns true if the matrix is initialized, false otherwise.
function is_p2q_mat
Returns true if the matrix is the p2q map, false otherwise.
function matvec
Performs matrix-vector multiplication.
Parameters:
xThe input vector.yThe output vector.use_aux_matFlag indicating if the auxiliary matrix G is used for the matvec.fullFlag indicating if the matvec is with the full matrix F*F or just F.
function transpose_matvec
Performs conjugate transpose matrix-vector multiplication.
Parameters:
xThe input vector.yThe output vector.use_aux_matFlag indicating if the auxiliary matrix G is used for the matvec.fullFlag indicating if the matvec is with the full matrix FF* or just F*.
function ~Matrix
Destroys the Matrix object. Frees the memory allocated for the matrix data.
The documentation for this class was generated from the following file src/Matrix.hpp