4#ifndef TETL_LINALG_BLAS3_MATRIX_PRODUCT_HPP
5#define TETL_LINALG_BLAS3_MATRIX_PRODUCT_HPP
7#include <etl/_contracts/check.hpp>
8#include <etl/_linalg/exposition.hpp>
14template <in_matrix InMat1, in_matrix InMat2, out_matrix OutMat>
17 static_assert(detail::possibly_multipliable<InMat1, InMat2, OutMat>());
18 TETL_PRECONDITION(detail::multipliable(a, b, c));
20 using index_type = detail::common_index_type_t<InMat1, InMat2, OutMat>;
21 using sum_type =
typename OutMat::element_type;
23 for (
auto i = index_type{0}; i <
static_cast<index_type>(a.extent(0)); ++i) {
24 for (
auto j = index_type{0}; j <
static_cast<index_type>(b.extent(1)); ++j) {
25 auto acc = sum_type{};
26 for (
auto k = index_type{0}; k <
static_cast<index_type>(a.extent(1)); ++k) {
27 acc += a(i, k) * b(k, j);
constexpr auto matrix_product(InMat1 a, InMat2 b, OutMat c) -> void
Computes C = AB.
Definition blas3_matrix_product.hpp:15
Definition accessor_conjugate.hpp:13
Definition adjacent_find.hpp:9