TRIQS/h5 1.3.0
C++ interface to HDF5
|
#include <h5/array_interface.hpp>
Struct representing a view on an n-dimensional array/dataspace.
A view consists of the parent array and of an h5::array_interface::hyperslab specifying a selection. The parent array is defined by a pointer to its data and its shape.
Note that the shape of the parent array does not necessarily have to correspond to the actual shape and size of the underlying memory. It is only used to select the correct elements in the hyperslab.
If the data of the array is complex, its imaginary part is treated as just another dimension.
Definition at line 155 of file array_interface.hpp.
Public Member Functions | |
array_view (datatype ty, void *start, int rank, bool is_complex) | |
Construct a new empty array view. | |
int | rank () const |
Get the rank of the view (including the possible added imaginary dimension). | |
Public Attributes | |
bool | is_complex |
Whether the data is complex valued. | |
v_t | parent_shape |
Shape of the (contiguous) parent array. | |
hyperslab | slab |
h5::array_interface::hyperslab specifying the selection of the view. | |
void * | start |
Pointer to the data of the array. | |
datatype | ty |
h5::datatype stored in the array. | |
|
inline |
Construct a new empty array view.
A complex view has an additional dimension for the imaginary part. The shape of the parent array is left uninitialized and the h5::array_interface::hyperslab is empty.
ty | h5::datatype of the array. |
start | Pointer to the data of the parent array. |
rank | Rank of the parent array (excluding the possible added imaginary dimension). |
is_complex | Whether the data is complex valued. |
Definition at line 182 of file array_interface.hpp.