46 : m_dims(
shape<1>{num_elems}), m_data(
data){};
55 T*
data()
const {
return m_data; }
63 size_t bytes()
const {
return m_dims[0] *
sizeof(T); }
A wrapper template class around a contiguous array of T types laid out in main memory (host memory)...
Definition: host_memory_1d.hpp:25
size_t bytes() const
Get the number of bytes of the memory sequence wrapped with the current HostMemory1D object...
Definition: host_memory_1d.hpp:63
shape< 1 > dims() const
Get the dimensions of this memory region in terms of elements.
Definition: host_memory_1d.hpp:70
HostMemory1D(T *data, size_t num_elems)
Construct a HostMemory1D class around the memory given by address and number of elements.
Definition: host_memory_1d.hpp:45
Eigen::array< size_t, N > shape
Shape of vectors, matrices, tensors, etc.
Definition: defs.hpp:66
T value_type
Type of the values stored in the memory sequence wrapped around the current HostMemory1D object...
Definition: host_memory_1d.hpp:31
Main namespace for bnmf-algs library.
Definition: alloc_model_funcs.hpp:12
T * data() const
Get the address of the memory sequence wrapped with the current HostMemory1D object.
Definition: host_memory_1d.hpp:55