Owning Dense Arrays
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.
raft::mdarray
Source header: raft/core/mdarray.hpp
Generic owning multi-dimensional array.
raft::mdarray::view
Returns an mdspan view over the owned storage.
Returns
mdspan_type or const_mdspan_type
raft::mdarray::data_handle
Returns the pointer to the owned storage.
Returns
element_type* or element_type const*
raft::mdarray::extents
Returns the extents object that describes the array shape.
Returns
extents_type
raft::mdarray::extent
Returns the size of one rank of the array.
Parameters
Returns
index_type
raft::mdarray::size
Returns the total number of elements in the array.
Returns
size_type
raft::mdarray::operator()
Indexes into the array. For device arrays, use this sparingly because element access may require device-host movement.
Parameters
Returns
reference or const_reference
raft::device_mdarray
Source header: raft/core/device_mdarray.hpp
Owning array in device-accessible memory.
raft::host_mdarray
Source header: raft/core/host_mdarray.hpp
Owning array in host memory.
raft::device_matrix
Source header: raft/core/device_mdarray.hpp
Owning device matrix alias used for datasets, outputs, and temporary storage.
raft::device_vector
Source header: raft/core/device_mdarray.hpp
Owning device vector alias used for outputs and temporary storage.
raft::host_matrix
Source header: raft/core/host_mdarray.hpp
Owning host matrix alias used for CPU-resident data and staging.
raft::host_vector
Source header: raft/core/host_mdarray.hpp
Owning host vector alias used for CPU-resident data and staging.