Sparse Array Types
Sparse RAFT types describe both the sparsity pattern and the values for APIs that accept sparse feature matrices or graph-style connectivity data.
raft::device_csr_matrix
Source header: raft/core/device_csr_matrix.hpp
Owning compressed sparse row matrix in device memory.
raft::device_csr_matrix::initialize_sparsity
Initializes or changes the number of nonzero entries when the matrix owns its sparsity.
Parameters
Returns
void
raft::device_csr_matrix::get_elements
Returns a span over the nonzero values.
Returns
raft::device_span<ElementType>
raft::device_csr_matrix::structure_view
Returns a non-owning view of the CSR sparsity structure. The returned view exposes the row offsets and column indices.
Returns
structure_view_type
raft::device_csr_matrix::view
Returns a sparsity-preserving non-owning view of the sparse matrix.
Returns
view_type
raft::device_csr_matrix_view
Source header: raft/core/device_csr_matrix.hpp
Non-owning compressed sparse row matrix view over device memory.
raft::device_csr_matrix_view::get_elements
Returns a span over the nonzero values.
Returns
raft::device_span<ElementType>
raft::device_csr_matrix_view::structure_view
Returns a non-owning view of the CSR sparsity structure.
Returns
structure_view_type
raft::device_coo_matrix
Source header: raft/core/device_coo_matrix.hpp
Owning coordinate sparse matrix in device memory.
raft::device_coo_matrix::initialize_sparsity
Initializes or changes the number of nonzero entries when the matrix owns its sparsity.
Parameters
Returns
void
raft::device_coo_matrix::get_elements
Returns a span over the nonzero values.
Returns
raft::device_span<ElementType>
raft::device_coo_matrix::structure_view
Returns a non-owning view of the COO sparsity structure. The returned view exposes the row and column coordinate arrays.
Returns
structure_view_type
raft::device_coo_matrix::view
Returns a sparsity-preserving non-owning view of the sparse matrix.
Returns
view_type
raft::device_coo_matrix_view
Source header: raft/core/device_coo_matrix.hpp
Non-owning coordinate sparse matrix view over device memory.
raft::device_coo_matrix_view::get_elements
Returns a span over the nonzero values.
Returns
raft::device_span<ElementType>
raft::device_coo_matrix_view::structure_view
Returns a non-owning view of the COO sparsity structure.
Returns
structure_view_type
raft::make_device_csr_matrix
Source header: raft/core/device_csr_matrix.hpp
Allocates an owning CSR matrix.
Parameters
Returns
raft::device_csr_matrix<ElementType, IndptrType, IndicesType, NZType>
raft::make_device_coo_matrix
Source header: raft/core/device_coo_matrix.hpp
Allocates an owning COO matrix.
Parameters
Returns
raft::device_coo_matrix<ElementType, RowType, ColType, NZType>