MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
spgemm.hpp File Reference
#include <cassert>
#include <cstddef>
#include <algorithm>
#include <limits>
#include <vector>
#include <type_traits>
#include <mtl/mat/compressed2D.hpp>
#include <mtl/math/identity.hpp>
#include <mtl/math/accumulator_traits.hpp>
#include <mtl/sparse/util/scatter.hpp>

Namespaces

namespace  mtl
namespace  mtl::detail
 mat*vec multiply into pre-allocated y: y = A * x.

Functions

template<typename Accumulator, typename V1, typename P1, typename V2, typename P2>
auto mtl::detail::spgemm_acc (const mat::compressed2D< V1, P1 > &A, const mat::compressed2D< V2, P2 > &B)
 spgemm with an accumulator: one per touched column of the current row, rounded once at the gather (see the header note).
template<typename Accumulator = void, typename V1, typename P1, typename V2, typename P2>
auto mtl::spgemm (const mat::compressed2D< V1, P1 > &A, const mat::compressed2D< V2, P2 > &B)
 Sparse-sparse product C = A * B, all in CSR (compressed2D).