struct ell_t

ELLPACK (ELL) format.

Stores up to pitch non-zeros per row in two row-major dense arrays of size rows * pitch. Rows shorter than the matrix-wide max are padded with the sentinel value index_t(-1) in the indices array; the matching value entries are zero. This wastes O((pitch - avg_nnz) * rows) of memory but enables predi

Defined in include/loops/container/ell.hxx

Template Parameters

ParameterDescription
index_tType of the column indices.
value_tType of the non-zero values.
spaceMemory space (host / device / managed).
offset_t
rhs_space
rhs_space
offset_t
rhs_space

Members

rows Number of rows.
cols Number of columns.
nnzs True non-zero count (excludes padding).
pitch Atoms per row; equals max-nnz-per-row over the matrix.
indices Column indices; length rows * pitch, row-major.
values Nonzero values; length rows * pitch, row-major.

Methods

__host__ __device__ index_t sentinel()
std::size_t max_nnz_per_row(const csr_t< index_t, offset_t, value_t, rhs_space > &csr)
Probe the ELL pitch (max-nnz-per-row) of a CSR matrix without materializing the dense storage.
ell_t()
ell_t(std::size_t r, std::size_t c, std::size_t nnz, std::size_t p)
ell_t(const ell_t< index_t, value_t, rhs_space > &rhs)
Cross-space copy.
ell_t(const csr_t< index_t, offset_t, value_t, rhs_space > &csr)
Build an ELL view of a CSR matrix.