<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
rotm.hpp
Go to the documentation of this file.
1
3//
4// Copyright (c) 2017-2021, University of Tennessee. All rights reserved.
5// Copyright (c) 2021-2023, University of Colorado Denver. All rights reserved.
6//
7// This file is part of <T>LAPACK.
8// <T>LAPACK is free software: you can redistribute it and/or modify it under
9// the terms of the BSD 3-Clause license. See the accompanying LICENSE file.
10
11#ifndef TLAPACK_LEGACY_ROTM_HH
12#define TLAPACK_LEGACY_ROTM_HH
13
14#include "tlapack/blas/rotm.hpp"
17
18namespace tlapack {
19namespace legacy {
20
55 template <typename TX, typename TY>
56 void rotm(idx_t n,
57 TX* x,
58 int_t incx,
59 TY* y,
60 int_t incy,
62 {
63 // constants
64 const int flag = (int)param[0];
65 const scalar_type<TX, TY>* h = &param[1];
66
67 // check arguments
71
72 // quick return
73 if (n <= 0) return;
74
76 x_, TX, n, x, incx, y_, TY, n, y, incy,
77 if (flag == -2) return rotm<-2>(x_, y_, h);
78 else if (flag == -1) return rotm<-1>(x_, y_, h);
79 else if (flag == 0) return rotm<0>(x_, y_, h);
80 else return rotm<1>(x_, y_, h););
81 }
82
83} // namespace legacy
84} // namespace tlapack
85
86#endif // #ifndef TLAPACK_LEGACY_ROTM_HH
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
void rotm(idx_t n, TX *x, int_t incx, TY *y, int_t incy, scalar_type< TX, TY > const param[5])
Apply modified (fast) plane rotation, H:
Definition rotm.hpp:56
#define tlapack_expr_with_2vectors(x, TX, n, X, incx, y, TY, m, Y, incy, expr)
Creates two vector objects and executes an expression with them.
Definition utils.hpp:33
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