Owning arrays allocate storage and release it when the object is destroyed. They are commonly used in examples, tests, index objects, and user code that needs RAFT to allocate inputs, outputs, or staging buffers.
Source header: raft/core/mdarray.hpp
Generic owning multi-dimensional array.
Returns an mdspan view over the owned storage.
Returns
mdspan_type or const_mdspan_type
Returns the pointer to the owned storage.
Returns
element_type* or element_type const*
Returns the extents object that describes the array shape.
Returns
extents_type
Returns the size of one rank of the array.
Parameters
Returns
index_type
Returns the total number of elements in the array.
Returns
size_type
Indexes into the array. For device arrays, use this sparingly because element access may require device-host movement.
Parameters
Returns
reference or const_reference
Source header: raft/core/device_mdarray.hpp
Owning array in device-accessible memory.
Source header: raft/core/host_mdarray.hpp
Owning array in host memory.
Source header: raft/core/device_mdarray.hpp
Owning device matrix alias used for datasets, outputs, and temporary storage.
Source header: raft/core/device_mdarray.hpp
Owning device vector alias used for outputs and temporary storage.
Source header: raft/core/host_mdarray.hpp
Owning host matrix alias used for CPU-resident data and staging.
Source header: raft/core/host_mdarray.hpp
Owning host vector alias used for CPU-resident data and staging.