matrix_data< T > Struct Template Reference
LibRPA
|
matrix_data< T > Struct Template Reference
struct to store the shared data and dimension More...
#include <matrix_m.h>
Public Member Functions | |
matrix_data (const std::array< int, 2 > &dim_in) | |
matrix_data (const std::array< int, 2 > &dim_in, const std::valarray< T > &data_in) | |
matrix_data (const std::array< int, 2 > &dim_in, const T *const pdata) | |
matrix_data (const std::array< int, 2 > &dim_in, const std::shared_ptr< std::valarray< T >> &data_in) | |
matrix_data (const std::shared_ptr< std::array< int, 2 >> &dim_in, const std::shared_ptr< std::valarray< T >> &data_in) | |
int | nr () const |
int | nc () const |
int | size () const |
int | mrank () const |
T & | operator[] (const int i) |
const T & | operator[] (const int i) const |
T * | ptr () |
const T * | ptr () const |
std::shared_ptr< std::valarray< T > > | sptr () |
const std::shared_ptr< std::valarray< T > > | sptr () const |
void | resize (const std::array< int, 2 > &dim_new) |
void | reshape (const std::array< int, 2 > &dim_new) |
void | operator+= (const matrix_data< T > &mdata) |
void | operator-= (const matrix_data< T > &mdata) |
Public Attributes | |
std::shared_ptr< std::array< int, 2 > > | dim = nullptr |
std::shared_ptr< std::valarray< T > > | data = nullptr |
Detailed Description
template<typename T>
struct matrix_data< T >
struct to store the shared data and dimension
The documentation for this struct was generated from the following file:
Generated by