![]() |
mptensor
v0.3.0
Parallel Library for Tensor Network Methods
|
Non-distributed matrix using LAPACK. More...
#include <matrix_lapack.hpp>
Public Types | |
| typedef C | value_type |
| typedef int | comm_type |
Public Member Functions | |
| Matrix () | |
| Default constructor. More... | |
| Matrix (const comm_type &comm_dummy) | |
| Constructor. More... | |
| Matrix (size_t n_row, size_t n_col) | |
| Constructor. More... | |
| Matrix (const comm_type &comm_dummy, size_t n_row, size_t n_col) | |
| Constructor. More... | |
| void | init (size_t n_row, size_t n_col) |
| const comm_type & | get_comm () const |
| Always returns 0. More... | |
| int | get_comm_size () const |
| Always returns 1. More... | |
| int | get_comm_rank () const |
| Always returns 0. More... | |
| 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 |
| Convert a global index to an index of local storage. More... | |
| 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 |
| Do nothing. More... | |
| void | prep_global_to_local () const |
| Do nothing. More... | |
| int | n_row () const |
| int | n_col () const |
| const Matrix | transpose () |
| void | save_index (const std::string &filename) const |
| template<typename UnaryOperation > | |
| Matrix< C > & | map (UnaryOperation op) |
| template<typename UnaryOperation > | |
| Matrix< C > & | map (UnaryOperation op) |
Static Public Attributes | |
| constexpr static size_t | matrix_type_tag = MATRIX_TYPE_TAG_LAPACK |
| constexpr static char * | matrix_type_name = (char*)"LAPACK" |
Non-distributed matrix using LAPACK.
| typedef int mptensor::lapack::Matrix< C >::comm_type |
| typedef C mptensor::lapack::Matrix< C >::value_type |
| mptensor::lapack::Matrix< C >::Matrix |
Default constructor.
The size of matrix is set to 0 times 0.
|
explicit |
Constructor.
| comm_dummy | Dummy argument. It is always ignored. |
| mptensor::lapack::Matrix< C >::Matrix | ( | size_t | n_row, |
| size_t | n_col | ||
| ) |
Constructor.
| n_row | The number of rows. |
| n_col | The number of columns. |
| mptensor::lapack::Matrix< C >::Matrix | ( | const comm_type & | comm_dummy, |
| size_t | n_row, | ||
| size_t | n_col | ||
| ) |
Constructor.
| comm_dummy | Dummy argument. It is always ignored. |
| n_row | The number of rows. |
| n_col | The number of columns. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Always returns 0.
|
inline |
Always returns 0.
|
inline |
Always returns 1.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Convert a global index to an index of local storage.
| [in] | g_row | Global index of a row. |
| [in] | g_col | Global index of a column. |
| [out] | comm_rank | Always set to 0. |
| [out] | lindex | Index of local storage. |
|
inline |
|
inline |
|
inline |
| Matrix& mptensor::lapack::Matrix< C >::map | ( | UnaryOperation | op | ) |
| Matrix<C>& mptensor::lapack::Matrix< C >::map | ( | UnaryOperation | op | ) |
| Matrix<C>& mptensor::lapack::Matrix< C >::map | ( | UnaryOperation | op | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Do nothing.
|
inline |
Do nothing.
|
inline |
| void mptensor::lapack::Matrix< C >::save_index | ( | const std::string & | filename | ) | const |
| const Matrix< C > mptensor::lapack::Matrix< C >::transpose |
|
staticconstexpr |
|
staticconstexpr |