FixedMetadata
FixedMetadata
Section titled “FixedMetadata”#include <layout.hh>template<typename T, ssize_t MaxNDim = NCARRAY_MAX_NDIM>struct FixedMetadataDefined in src/lib/ncarray/layout.hh:93
For simplifying CPU/GPU compatibility, STL containers are replaced with a fixed struct for expressing metadata surrounding arrays. E.g. shape and strides information. Currently, ncarray supports up to 10 dimensions in an array.
The FixedMetadata struct is a small component which is used for the holding of the above metadata. It has a data member (which will be the shape data, e.g.) and also holds its dimensionality in ndim. This struct is templated so the underlying type for the metadata arrays can be changed.
Parameters
Section titled “Parameters”-
TThe type of the underlying metadata being held. -
MaxNDimThe maximum array dimensionality.
List of all members
Section titled “List of all members”| Name | Kind | Owner |
|---|---|---|
data |
variable |
Declared here |
ndim |
variable |
Declared here |
operator[] |
function |
Declared here |
operator[] |
function |
Declared here |
set |
function |
Declared here |
value_type |
typedef |
Declared here |
Public Attributes
Section titled “Public Attributes”| Return | Name | Description |
|---|---|---|
T |
data |
|
ssize_t |
ndim |
T data { 0 }Defined in src/lib/ncarray/layout.hh:97
ssize_t ndim { 0 }Defined in src/lib/ncarray/layout.hh:98
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
NCA_HD constexpr T & |
operator[] inline constexpr |
|
NCA_HD constexpr const T & |
operator[] const inline constexpr |
|
NCA_HD void |
set inline |
operator[]
Section titled “operator[]”inline constexpr
constexpr inline NCA_HD constexpr T & operator[](ssize_t i)Defined in src/lib/ncarray/layout.hh:101
operator[]
Section titled “operator[]”const inline constexpr
constexpr inline NCA_HD constexpr const T & operator[](ssize_t i) constDefined in src/lib/ncarray/layout.hh:105
inline
inline NCA_HD void set(const T * vals, ssize_t n)Defined in src/lib/ncarray/layout.hh:109
Public Types
Section titled “Public Types”| Name | Description |
|---|---|
value_type |
value_type
Section titled “value_type”using value_type = TDefined in src/lib/ncarray/layout.hh:95