Skip to content

StoragePolicy

#include <ncarray/storage.hh>
template<class Derived>
struct StoragePolicy

Defined in src/lib/ncarray/storage.hh:97

The StoragePolicy specifies the storage class for the array in question. E.g., a view type array holds no memory, while an owning type does.

The StoragePolicy gives access to a data type, the underlying data, and whether or not said data is writeable, or is just read only.

Return Name Description
StoragePolicy Defaulted constructor.
NCA_HD StoragePolicy inline
NCA_HD void * data const inline
NCA_HD ssize_t itemsize const inline
NCA_HDDType dtype const inline
NCA_HD bool read_only const inline
NCA_HD const char * storage_repr const inline The repr functions return a string to identify the storage policy when writing out string representations of the array.

StoragePolicy() = default

Defined in src/lib/ncarray/storage.hh:101

Defaulted constructor.


inline

template<class OtherDerived> inline NCA_HD StoragePolicy(const StoragePolicy< OtherDerived > & other)

Defined in src/lib/ncarray/storage.hh:105


const inline

inline NCA_HD void * data() const

Defined in src/lib/ncarray/storage.hh:111


const inline

inline NCA_HD ssize_t itemsize() const

Defined in src/lib/ncarray/storage.hh:113


const inline

inline NCA_HDDType dtype() const

Defined in src/lib/ncarray/storage.hh:117


const inline

inline NCA_HD bool read_only() const

Defined in src/lib/ncarray/storage.hh:119


const inline

inline NCA_HD const char * storage_repr() const

Defined in src/lib/ncarray/storage.hh:125

The repr functions return a string to identify the storage policy when writing out string representations of the array.

Return Name Description
DType m_dtype
void * m_data
bool m_read_only

DType m_dtype

Type: DType

Defined in src/lib/ncarray/storage.hh:130


void * m_data { nullptr }

Defined in src/lib/ncarray/storage.hh:131


bool m_read_only { true }

Defined in src/lib/ncarray/storage.hh:132

Name Description
MemType

using MemType = HostTag

Type: HostTag

Defined in src/lib/ncarray/storage.hh:99