|
TRIQS/h5 2.0.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 buffer encodes complex values via the TRIQS trailing-2 FLOAT convention, the imaginary part is treated as just another dimension.
Definition at line 159 of file array_interface.hpp.
Public Member Functions | |
| array_view (datatype ty, void *start, int rank, bool has_cplx_trailing_dim) | |
| Construct a new empty array view. | |
| int | rank () const |
| Get the rank of the view (including the possible added imaginary dimension). | |
Public Attributes | |
| bool | has_cplx_trailing_dim |
| 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.
If has_cplx_trailing_dim is true, the view gets an extra trailing dimension of size 2 to encode 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). |
| has_cplx_trailing_dim | True if the buffer encodes complex values via a trailing dim of size 2 (TRIQS convention). |
Definition at line 188 of file array_interface.hpp.
| bool h5::array_interface::array_view::has_cplx_trailing_dim |
True if the buffer encodes complex values via a trailing dim of size 2 (TRIQS convention, e.g. std::complex<double> viewed as a double array with a trailing dim of size 2).
Definition at line 174 of file array_interface.hpp.