4#ifndef TETL_LINALG_BLAS1_COPY_HPP
5#define TETL_LINALG_BLAS1_COPY_HPP
7#include <etl/_contracts/check.hpp>
8#include <etl/_linalg/exposition.hpp>
13template <in_object InObj, out_object OutObj>
14 requires(InObj::rank() == OutObj::rank())
15constexpr auto copy(InObj x, OutObj y) ->
void
17 TETL_PRECONDITION(x.extents() == y.extents());
19 using index_type = detail::common_index_type_t<InObj, OutObj>;
21 if constexpr (InObj::rank() == 1) {
22 static_assert(detail::compatible_static_extents<InObj, OutObj>(0, 0));
23 for (index_type i{0}; i < x.extent(0); ++i) {
27 static_assert(InObj::rank() == 2);
28 static_assert(detail::compatible_static_extents<InObj, OutObj>(0, 0));
29 static_assert(detail::compatible_static_extents<InObj, OutObj>(1, 1));
31 for (index_type i{0}; i < x.extent(0); ++i) {
32 for (index_type j{0}; j < x.extent(1); ++j) {
constexpr auto copy(InObj x, OutObj y) -> void
Definition blas1_copy.hpp:15
Definition accessor_conjugate.hpp:13
Definition adjacent_find.hpp:9