StoragePolicy
StoragePolicy
Section titled “StoragePolicy”#include <storage.hh>template<class Derived>struct StoragePolicyDefined 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.
List of all members
Section titled “List of all members”| 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 |
Public Methods
Section titled “Public Methods”| 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
Section titled “StoragePolicy”StoragePolicy() = defaultDefined in src/lib/ncarray/storage.hh:101
Defaulted constructor.
StoragePolicy
Section titled “StoragePolicy”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() constDefined in src/lib/ncarray/storage.hh:111
itemsize
Section titled “itemsize”const inline
inline NCA_HD ssize_t itemsize() constDefined in src/lib/ncarray/storage.hh:113
const inline
inline NCA_HDDType dtype() constDefined in src/lib/ncarray/storage.hh:117
read_only
Section titled “read_only”const inline
inline NCA_HD bool read_only() constDefined in src/lib/ncarray/storage.hh:119
storage_repr
Section titled “storage_repr”const inline
inline NCA_HD const char * storage_repr() constDefined 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.
Protected Attributes
Section titled “Protected Attributes”| Return | Name | Description |
|---|---|---|
DType |
m_dtype |
|
void * |
m_data |
|
bool |
m_read_only |
m_dtype
Section titled “m_dtype”DType m_dtypeDefined in src/lib/ncarray/storage.hh:130
m_data
Section titled “m_data”void * m_data { nullptr }Defined in src/lib/ncarray/storage.hh:131
m_read_only
Section titled “m_read_only”bool m_read_only { true }Defined in src/lib/ncarray/storage.hh:132
Public Types
Section titled “Public Types”| Name | Description |
|---|---|
MemType |
MemType
Section titled “MemType”using MemType = HostTagDefined in src/lib/ncarray/storage.hh:99