10#ifndef TLAPACK_INFNORM_HE_COLMAJOR_HH
11#define TLAPACK_INFNORM_HE_COLMAJOR_HH
29template <
class T, TLAPACK_UPLO uplo_t, TLAPACK_MATRIX matrix_t>
60 const idx_t n = nrows(
A);
63 if (n <= 0)
return real_t(0);
71 for (idx_t i = 0; i < n; ++i)
75 for (idx_t j = 0; j < n; ++j) {
77 for (idx_t i = 0; i < j; ++i) {
84 for (idx_t i = 0; i < n; ++i) {
94 for (idx_t j = 0; j < n; ++j) {
96 for (idx_t i = j + 1; i < n; ++i) {
127template <TLAPACK_UPLO uplo_t, TLAPACK_MATRIX matrix_t>
138 const idx_t n = nrows(
A);
141 if (n <= 0)
return real_t(0);
145 std::vector<T>
work_;
#define TLAPACK_UPLO
Macro for tlapack::concepts::Uplo compatible with C++17.
Definition concepts.hpp:942
#define TLAPACK_WORKSPACE
Macro for tlapack::concepts::Workspace compatible with C++17.
Definition concepts.hpp:912
#define TLAPACK_MATRIX
Macro for tlapack::concepts::Matrix compatible with C++17.
Definition concepts.hpp:896
auto infnorm_hermitian_colmajor(uplo_t uplo, const matrix_t &A)
Calculates the infinity norm of a column-major hermitian matrix.
Definition infnorm_hermitian_colmajor.hpp:128
auto infnorm_hermitian_colmajor_work(uplo_t uplo, const matrix_t &A, work_t &work)
Calculates the infinity norm of a column-major hermitian matrix. Workspace is provided as an argume...
Definition infnorm_hermitian_colmajor.hpp:47
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
constexpr WorkInfo infnorm_hermitian_colmajor_worksize(uplo_t uplo, const matrix_t &A)
Worspace query of infnorm_hermitian_colmajor()
Definition infnorm_hermitian_colmajor.hpp:30
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
constexpr bool isnan(const T &x) noexcept
Extends std::isnan() to complex numbers.
Definition utils.hpp:125
constexpr real_type< T > real(const T &x) noexcept
Extends std::real() to real datatypes.
Definition utils.hpp:71
@ Upper
0 <= i <= j, 0 <= j <= n.
@ Lower
0 <= i <= m, 0 <= j <= i.
Output information in the workspace query.
Definition workspace.hpp:16