|
Ensign
Low-rank framework for multi-core CPUs and GPUs
|
Dense d-dimensional array stored contiguously in column-major order (i.e. More...
#include <storage.hpp>
Public Member Functions | |
| multi_array (stloc _sl=stloc::host) | |
| multi_array (array< Index, d > _e, stloc _sl=stloc::host) | |
| multi_array (array< Index, d > _emax, array< Index, d > _e, stloc _sl=stloc::host) | |
| multi_array (const multi_array &ma) | |
| multi_array & | operator= (const multi_array &ma) |
| void | resize (array< Index, d > _e) |
| void | reserve (array< Index, d > _emax, array< Index, d > _e) |
| void | swap (multi_array &ma) |
| void | update_shape (array< Index, d > _e) |
| ~multi_array () | |
| void | set_zero () |
| Index | linear_idx (array< Index, d > idx) const |
| void | to_cplx (multi_array< complex< T >, d > &out) const |
| void | save_vector (std::string fn) |
| T & | operator() (array< Index, d > idx) |
| const T & | operator() (array< Index, d > idx) const |
| template<typename... Ints> | |
| T & | operator() (Ints &&... idx) |
| template<typename... Ints> | |
| const T & | operator() (Ints &&... idx) const |
| T * | extract (array< Index, d-1 > idx_r) |
| const T * | extract (array< Index, d-1 > idx_r) const |
| array< Index, d > | shape () const |
| array< Index, d > | shape_alloc () const |
| T * | data () |
| const T * | data () const |
| Index | num_elements () const |
| T * | begin () const noexcept |
| T * | end () const noexcept |
| multi_array & | operator+= (const multi_array &lhs) |
| multi_array & | operator+= (const T scalar) |
| multi_array & | operator-= (const multi_array &lhs) |
| multi_array & | operator*= (T scalar) |
| multi_array & | operator/= (const T scalar) |
| multi_array | operator+ (const multi_array &lhs) |
| multi_array | operator- (const multi_array &lhs) |
| multi_array | operator* (const T scalar) |
| bool | operator== (const multi_array &lhs) const |
| void | sadd (const T scalar, const multi_array &ma) |
Public Attributes | |
| array< Index, d > | e |
| array< Index, d > | emax |
| T * | v |
| stloc | sl |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const multi_array &A) |
Dense d-dimensional array stored contiguously in column-major order (i.e.
the leftmost index is contiguous in memory).
The memory resides either on the host (CPU) or the device (GPU), depending on stloc. Memory for a larger shape (emax) can be reserved and the current shape (e) changed without reallocation.
Definition at line 24 of file storage.hpp.
|
inline |
Definition at line 30 of file storage.hpp.
|
inline |
Definition at line 35 of file storage.hpp.
|
inline |
Definition at line 39 of file storage.hpp.
|
inline |
Definition at line 44 of file storage.hpp.
|
inline |
Definition at line 158 of file storage.hpp.
|
inlinenoexcept |
Definition at line 276 of file storage.hpp.
|
inline |
Definition at line 252 of file storage.hpp.
|
inline |
Definition at line 260 of file storage.hpp.
|
inlinenoexcept |
Definition at line 284 of file storage.hpp.
|
inline |
Definition at line 229 of file storage.hpp.
|
inline |
Definition at line 236 of file storage.hpp.
|
inline |
Definition at line 186 of file storage.hpp.
|
inline |
Definition at line 268 of file storage.hpp.
|
inline |
Definition at line 206 of file storage.hpp.
|
inline |
Definition at line 210 of file storage.hpp.
|
inline |
Definition at line 217 of file storage.hpp.
|
inline |
Definition at line 223 of file storage.hpp.
|
inline |
Definition at line 411 of file storage.hpp.
|
inline |
Definition at line 352 of file storage.hpp.
|
inline |
Definition at line 381 of file storage.hpp.
|
inline |
Definition at line 292 of file storage.hpp.
|
inline |
Definition at line 317 of file storage.hpp.
|
inline |
Definition at line 396 of file storage.hpp.
|
inline |
Definition at line 332 of file storage.hpp.
|
inline |
Definition at line 367 of file storage.hpp.
|
inline |
Definition at line 62 of file storage.hpp.
|
inline |
Definition at line 447 of file storage.hpp.
|
inline |
Definition at line 118 of file storage.hpp.
|
inline |
Definition at line 94 of file storage.hpp.
|
inline |
Definition at line 464 of file storage.hpp.
|
inline |
Definition at line 201 of file storage.hpp.
|
inline |
Definition at line 174 of file storage.hpp.
|
inline |
Definition at line 244 of file storage.hpp.
|
inline |
Definition at line 248 of file storage.hpp.
|
inline |
Definition at line 143 of file storage.hpp.
|
inline |
Definition at line 197 of file storage.hpp.
|
inline |
Definition at line 154 of file storage.hpp.
|
friend |
Definition at line 426 of file storage.hpp.
| array<Index,d> Ensign::multi_array< T, d >::e |
Definition at line 25 of file storage.hpp.
| array<Index,d> Ensign::multi_array< T, d >::emax |
Definition at line 26 of file storage.hpp.
| stloc Ensign::multi_array< T, d >::sl |
Definition at line 28 of file storage.hpp.
| T* Ensign::multi_array< T, d >::v |
Definition at line 27 of file storage.hpp.