<T>LAPACK 0.1.2
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
lantr.hpp
Go to the documentation of this file.
1
3//
4// Copyright (c) 2025, University of Colorado Denver. All rights reserved.
5//
6// This file is part of <T>LAPACK.
7// <T>LAPACK is free software: you can redistribute it and/or modify it under
8// the terms of the BSD 3-Clause license. See the accompanying LICENSE file.
9
10#ifndef TLAPACK_LEGACY_LANTR_HH
11#define TLAPACK_LEGACY_LANTR_HH
12
15
16namespace tlapack {
17namespace legacy {
18
48 template <typename TA>
50 Uplo uplo,
51 Diag diag,
52 idx_t m,
53 idx_t n,
54 const TA* A,
55 idx_t lda)
56 {
57 using internal::create_matrix;
58
59 // check arguments
64
65 // quick return
66 if (m == 0 || n == 0) return 0;
67
68 // Matrix views
69 auto A_ = create_matrix<TA>((TA*)A, m, n, lda);
70
71 return lantr(normType, uplo, diag, A_);
72 }
73
74} // namespace legacy
75} // namespace tlapack
76
77#endif // TLAPACK_LEGACY_LANTR_HH
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
real_type< TA > lantr(Norm normType, Uplo uplo, Diag diag, idx_t m, idx_t n, const TA *A, idx_t lda)
Calculates the value of the one norm, Frobenius norm, infinity norm, or element of largest absolute v...
Definition lantr.hpp:49
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
Diag
Definition types.hpp:197
@ Unit
The main diagonal is assumed to consist of 1's.
@ NonUnit
The main diagonal is not assumed to consist of 1's.
constexpr auto diag(T &A, int diagIdx=0) noexcept
Get the Diagonal of an Eigen Matrix.
Definition eigen.hpp:576
Uplo
Definition types.hpp:50
@ Upper
0 <= i <= j, 0 <= j <= n.
@ Lower
0 <= i <= m, 0 <= j <= i.
Norm
Definition types.hpp:301
@ Inf
infinity norm of matrices
@ One
one norm
@ Max
max norm
@ Fro
Frobenius norm of matrices.