mptensor
v0.3.0
Parallel Library for Tensor Network Methods
|
Distributed matrix using ScaLAPACK. More...
#include <matrix_scalapack.hpp>
Public Types | |
typedef C | value_type |
typedef MPI_Comm | comm_type |
Public Member Functions | |
Matrix () | |
Matrix (const MPI_Comm &comm) | |
Matrix (size_t n_row, size_t n_col) | |
Matrix (const MPI_Comm &comm, size_t n_row, size_t n_col) | |
void | init (size_t n_row, size_t n_col) |
const MPI_Comm & | get_comm () const |
int | get_comm_size () const |
int | get_comm_rank () const |
void | print_info (std::ostream &) const |
const C & | operator[] (size_t i) const |
C & | operator[] (size_t i) |
const C * | head () const |
C * | head () |
size_t | local_size () const |
void | global_index (size_t i, size_t &g_row, size_t &g_col) const |
bool | local_index (size_t g_row, size_t g_col, size_t &i) const |
void | local_position (size_t g_row, size_t g_col, int &comm_rank, size_t &lindex) const |
size_t | local_row_size () const |
size_t | local_col_size () const |
size_t | local_row_index (size_t lindex) const |
size_t | local_col_index (size_t lindex) const |
size_t | global_row_index (size_t lindex_row) const |
size_t | global_col_index (size_t lindex_col) const |
Matrix & | operator+= (const Matrix &rhs) |
Matrix & | operator-= (const Matrix &rhs) |
Matrix & | operator*= (C rhs) |
Matrix & | operator/= (C rhs) |
template<typename UnaryOperation > | |
Matrix & | map (UnaryOperation op) |
std::vector< C > | flatten () |
void | barrier () const |
C | allreduce_sum (C value) const |
template<typename D > | |
void | bcast (D *buffer, int count, int root) const |
void | prep_local_to_global () const |
Preprocess for fast conversion from local index to global one. More... | |
void | prep_global_to_local () const |
Preprocess for fast conversion from global index to local one. More... | |
int | n_row () const |
int | n_col () const |
const int * | descriptor () const |
const Matrix | transpose () |
void | save_index (const std::string &filename) const |
Static Public Attributes | |
constexpr static size_t | matrix_type_tag = MATRIX_TYPE_TAG_SCALAPACK |
constexpr static char * | matrix_type_name = (char*)"ScaLAPACK" |
Distributed matrix using ScaLAPACK.
typedef MPI_Comm mptensor::scalapack::Matrix< C >::comm_type |
typedef C mptensor::scalapack::Matrix< C >::value_type |
mptensor::scalapack::Matrix< C >::Matrix |
|
explicit |
mptensor::scalapack::Matrix< C >::Matrix | ( | size_t | n_row, |
size_t | n_col | ||
) |
mptensor::scalapack::Matrix< C >::Matrix | ( | const MPI_Comm & | comm, |
size_t | n_row, | ||
size_t | n_col | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void mptensor::scalapack::Matrix< C >::init | ( | size_t | n_row, |
size_t | n_col | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Matrix& mptensor::scalapack::Matrix< C >::map | ( | UnaryOperation | op | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Preprocess for fast conversion from global index to local one.
|
inline |
Preprocess for fast conversion from local index to global one.
|
inline |
void mptensor::scalapack::Matrix< C >::save_index | ( | const std::string & | filename | ) | const |
const Matrix< C > mptensor::scalapack::Matrix< C >::transpose |
|
staticconstexpr |
|
staticconstexpr |