4#ifndef TETL_LINALG_BLAS2_MATRIX_VECTOR_PRODUCT_HPP
5#define TETL_LINALG_BLAS2_MATRIX_VECTOR_PRODUCT_HPP
7#include <etl/_contracts/check.hpp>
8#include <etl/_linalg/exposition.hpp>
13template <in_matrix InMat, in_vector InVec, out_vector OutVec>
16 TETL_PRECONDITION(a.extent(1) == x.extent(0));
17 TETL_PRECONDITION(a.extent(0) == y.extent(0));
19 using index_type = detail::common_index_type_t<InMat, InVec, OutVec>;
21 for (index_type i{0}; i <
static_cast<index_type>(a.extent(0)); ++i) {
22 y(i) =
typename OutVec::element_type{};
23 for (index_type j{0}; j <
static_cast<index_type>(a.extent(1)); ++j) {
24 y(i) += a(i, j) * x(j);
constexpr auto matrix_vector_product(InMat a, InVec x, OutVec y) noexcept -> void
Definition blas2_matrix_vector_product.hpp:14
Definition accessor_conjugate.hpp:13
Definition adjacent_find.hpp:9