14namespace uni20::linalg::detail
17using matrix_product_extents = stdex::dextents<uni20::index_type, 2>;
19template <
class Lhs,
class Rhs>
20[[nodiscard]] matrix_product_extents matrix_product_shape_impl(Lhs
const& lhs, Rhs
const& rhs)
22 ERROR_IF(lhs.extent(1) != rhs.extent(0),
"matrix product inner extents do not agree", lhs.extent(1), rhs.extent(0));
28template <uni20::RankedTensorView<2> LhsTensor, uni20::RankedTensorView<2> RhsTensor>
29[[nodiscard]] matrix_product_extents matrix_product_shape(LhsTensor
const& lhs, RhsTensor
const& rhs)
31 return matrix_product_shape_impl(lhs, rhs);
35template <uni20::RankedMdspecLike<2> LhsMdspan, uni20::RankedMdspecLike<2> RhsMdspan>
36[[nodiscard]] matrix_product_extents matrix_product_shape(LhsMdspan
const& lhs, RhsMdspan
const& rhs)
38 return matrix_product_shape_impl(lhs, rhs);
Configured gateway to Uni20's mdspan implementation.
std::ptrdiff_t index_type
Definition types.hpp:19
Concepts for tensor-level objects that resolve mdspan kernel operands.
#define ERROR_IF(cond,...)
Definition trace.hpp:389