Skip to content

num::kernel::spmm

Defined in header <kernel/sparse.hpp>

template <std::floating_point T, std::integral Index>
void spmm(T *Y, idx ldy, const T *val, const Index *row_ptr, const Index *col_idx,
          const T *X, idx ldx, std::type_identity_t<Index> m, idx nrhs) noexcept;

CSR sparse matrix times a row-major dense block, Y <- A*X, with nrhs values per row. The right-hand-side loop is innermost, so it vectorizes.