12#ifndef TLAPACK_LASCL_HH
13#define TLAPACK_LASCL_HH
59 is_real<a_type> && is_real<b_type>),
68 const idx_t m = nrows(
A);
69 const idx_t n = ncols(
A);
77 (
uplo != Uplo::General) && (
uplo != Uplo::UpperHessenberg) &&
78 (
uplo != Uplo::LowerHessenberg) && (
uplo != Uplo::Upper) &&
79 (
uplo != Uplo::Lower) && (
uplo != Uplo::StrictUpper) &&
80 (
uplo != Uplo::StrictLower));
85 if (m <= 0 || n <= 0)
return 0;
115 else if (abs(
a1) > abs(
b_)) {
131 if (
uplo == Uplo::UpperHessenberg) {
132 for (idx_t j = 0; j < n; ++j)
133 for (idx_t i = 0; i < ((j < m) ? j + 2 : m); ++i)
136 else if (
uplo == Uplo::Upper) {
137 for (idx_t j = 0; j < n; ++j)
138 for (idx_t i = 0; i < ((j < m) ? j + 1 : m); ++i)
141 else if (
uplo == Uplo::StrictUpper) {
142 for (idx_t j = 0; j < n; ++j)
143 for (idx_t i = 0; i < ((j < m) ? j : m); ++i)
146 else if (
uplo == Uplo::LowerHessenberg) {
147 for (idx_t j = 0; j < n; ++j)
148 for (idx_t i = ((j > 1) ? j - 1 : 0); i < m; ++i)
151 else if (
uplo == Uplo::Lower) {
152 for (idx_t j = 0; j < n; ++j)
153 for (idx_t i = j; i < m; ++i)
156 else if (
uplo == Uplo::StrictLower) {
157 for (idx_t j = 0; j < n; ++j)
158 for (idx_t i = j + 1; i < m; ++i)
163 for (idx_t j = 0; j < n; ++j)
164 for (idx_t i = 0; i < m; ++i)
192 is_real<a_type> && is_real<b_type>),
201 const idx_t m = nrows(
A);
202 const idx_t n = ncols(
A);
216 if (m <= 0 || n <= 0)
return 0;
246 else if (abs(
a1) > abs(
b_)) {
262 for (idx_t j = 0; j < n; ++j)
263 for (idx_t i = ((j >= ku) ? (j - ku) : 0); i < min(m, j + kl + 1);
constexpr bool isnan(const T &x) noexcept
Extends std::isnan() to complex numbers.
Definition utils.hpp:125
#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
#define TLAPACK_REAL
Macro for tlapack::concepts::Real compatible with C++17.
Definition concepts.hpp:918
int lascl(uplo_t uplo, const b_type &b, const a_type &a, matrix_t &A)
Multiplies a matrix A by the real scalar a/b.
Definition lascl.hpp:61
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
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
Band access.
Definition types.hpp:432