12#ifndef TLAPACK_LACPY_HH
13#define TLAPACK_LACPY_HH
45 const idx_t m = nrows(
A);
46 const idx_t n = ncols(
A);
54 for (idx_t j = 0; j < n; ++j) {
55 const idx_t
M = min(m, j + 1);
56 for (idx_t i = 0; i <
M; ++i)
57 B(i, j) = (
TB)
A(i, j);
62 const idx_t
N = min(m, n);
63 for (idx_t j = 0; j <
N; ++j)
64 for (idx_t i = j; i < m; ++i)
65 B(i, j) = (
TB)
A(i, j);
69 for (idx_t j = 0; j < n; ++j)
70 for (idx_t i = 0; i < m; ++i)
71 B(i, j) = (
TB)
A(i, j);
#define TLAPACK_UPLO
Macro for tlapack::concepts::Uplo compatible with C++17.
Definition concepts.hpp:942
#define TLAPACK_MATRIX
Macro for tlapack::concepts::Matrix compatible with C++17.
Definition concepts.hpp:896
void lacpy(uplo_t uplo, const matrixA_t &A, matrixB_t &B)
Copies a matrix from A to B.
Definition lacpy.hpp:38
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
Sort the numbers in D in increasing order (if ID = 'I') or in decreasing order (if ID = 'D' ).
Definition arrayTraits.hpp:15
typename traits::real_type_traits< Types..., int >::type real_type
The common real type of the list of types.
Definition scalar_type_traits.hpp:113
@ General
0 <= i <= m, 0 <= j <= n.
@ Upper
0 <= i <= j, 0 <= j <= n.
@ Lower
0 <= i <= m, 0 <= j <= i.