11#ifndef TLAPACK_BLAS_ROTM_HH
12#define TLAPACK_BLAS_ROTM_HH
71 enable_if_t<((-2 <=
flag) && (
flag <= 1)),
int> = 0,
81 const idx_t n = size(
x);
87 for (idx_t i = 0; i < n; ++i) {
89 y[i] =
h[3] *
y[i] +
h[1] *
x[i];
94 for (idx_t i = 0; i < n; ++i) {
96 y[i] =
y[i] +
h[1] *
x[i];
100 else if (
flag == 1) {
101 for (idx_t i = 0; i < n; ++i) {
103 y[i] =
h[3] *
y[i] -
x[i];
109#ifdef TLAPACK_USE_LAPACKPP
115 enable_if_t<((-2 <=
flag) && (
flag <= 1)),
int> = 0,
122 auto x_ = legacy_vector(
x);
123 auto y_ = legacy_vector(
y);
126 const auto& n =
x_.n;
127 const T
h_[] = {(T)
flag,
h[0],
h[1],
h[2],
h[3]};
129 return ::blas::rotm(n,
x_.ptr,
x_.inc,
y_.ptr,
y_.inc,
h_);
#define TLAPACK_LEGACY_VECTOR
Macro for tlapack::concepts::LegacyVector compatible with C++17.
Definition concepts.hpp:954
#define TLAPACK_VECTOR
Macro for tlapack::concepts::Vector compatible with C++17.
Definition concepts.hpp:906
void rotm(vectorX_t &x, vectorY_t &y, const T h[4])
Apply modified (fast) plane rotation, H:
Definition rotm.hpp:75
#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
enable_if_t<(!allow_optblas< T1, Ts... >), int > disable_if_allow_optblas_t
Disable if the list of types allows optimized BLAS library.
Definition utils.hpp:303
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
enable_if_t<(allow_optblas< T1, Ts... >), int > enable_if_allow_optblas_t
Enable if the list of types allows optimized BLAS library.
Definition utils.hpp:298