Dense Array Views
Dense array views describe memory owned somewhere else. They carry the pointer, shape, layout, memory-space accessor, and constness needed by NVIDIA cuVS C++ APIs without allocating or freeing data.
raft::mdspan
Source header: raft/core/mdspan.hpp
Generic multi-dimensional non-owning view.
raft::mdspan::data_handle
Returns the pointer held by the non-owning view.
Returns
element_type*
raft::mdspan::extents
Returns the extents object that describes the view shape.
Returns
extents_type
raft::mdspan::extent
Returns the size of one rank of the view.
Parameters
Returns
index_type
raft::mdspan::stride
Returns the stride for one rank of a strided view.
Parameters
Returns
index_type
raft::mdspan::size
Returns the total number of elements described by the view.
Returns
size_type
raft::mdspan::empty
Reports whether the view describes zero elements.
Returns
bool
raft::mdspan::operator()
Indexes into the view with one coordinate per rank.
Parameters
Returns
reference
raft::device_mdspan
Source header: raft/core/device_mdspan.hpp
Non-owning view over device-accessible memory.
raft::host_mdspan
Source header: raft/core/host_mdspan.hpp
Non-owning view over host memory.
raft::device_matrix_view
Source header: raft/core/device_mdspan.hpp
Common device view alias for matrix arguments.
raft::device_vector_view
Source header: raft/core/device_mdspan.hpp
Common device view alias for vector arguments.
raft::device_scalar_view
Source header: raft/core/device_mdspan.hpp
Common device view alias for scalar arguments.
raft::host_matrix_view
Source header: raft/core/host_mdspan.hpp
Common host view alias for matrix arguments.
raft::host_vector_view
Source header: raft/core/host_mdspan.hpp
Common host view alias for vector arguments.
raft::host_scalar_view
Source header: raft/core/host_mdspan.hpp
Common host view alias for scalar arguments.
raft::span
Source header: raft/core/span.hpp
Lightweight one-dimensional non-owning view. NVIDIA cuVS public APIs usually prefer device_vector_view and host_vector_view for one-dimensional buffers.
raft::span::data
Returns the pointer held by the span.
Returns
element_type*
raft::span::size
Returns the number of elements in the span.
Returns
size_type
raft::span::empty
Reports whether the span contains zero elements.
Returns
bool
raft::span::operator[]
Indexes into the span.
Parameters
Returns
reference
raft::span::begin
Returns an iterator to the first element.
Returns
iterator
raft::span::end
Returns an iterator one past the last element.
Returns
iterator