4#ifndef TETL_LINALG_BLAS1_SCALE_HPP
5#define TETL_LINALG_BLAS1_SCALE_HPP
7#include <etl/_linalg/exposition.hpp>
12template <
typename Scalar, inout_object InOutObj>
13constexpr auto scale(Scalar alpha, InOutObj x) ->
void
15 using index_type =
typename InOutObj::index_type;
17 if constexpr (InOutObj::rank() == 1) {
18 for (index_type i{0}; i < x.extent(0); ++i) {
22 static_assert(InOutObj::rank() == 2);
23 for (index_type i{0}; i < x.extent(0); ++i) {
24 for (index_type j{0}; j < x.extent(1); ++j) {
25 x(i, j) = x(i, j) * alpha;
constexpr auto scale(Scalar alpha, InOutObj x) -> void
Definition blas1_scale.hpp:13
Definition accessor_conjugate.hpp:13
Definition adjacent_find.hpp:9