Skip to content

StoragePolicy

#include <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.

Name Kind Owner
StoragePolicy function Declared here
StoragePolicy function Declared here
data function Declared here
itemsize function Declared here
dtype function Declared here
read_only function Declared here
storage_repr function Declared here
m_dtype variable Declared here
m_data variable Declared here
m_read_only variable Declared here
MemType typedef Declared here
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

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

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