42 #ifndef _TEUCHOS_BLAS_MP_VECTOR_HPP_
43 #define _TEUCHOS_BLAS_MP_VECTOR_HPP_
54 template<
typename Storage>
92 if (STS::magnitude (*da) > STS::magnitude (*db)) {
95 scale = STS::magnitude (*da) + STS::magnitude (*db);
96 if (scale == STS::zero()) {
107 r = scale * STS::squareroot (da_scaled*da_scaled + db_scaled*db_scaled);
108 r = SIGN (STS::one(), roe) * r;
112 if (STS::magnitude (*da) > STS::magnitude (*db)) {
115 if (STS::magnitude (*db) >= STS::magnitude (*da) && *c != STS::zero()) {
132 const ordinal_type sz = x.size() > y.size() ? x.size() : y.size();
134 for (ordinal_type i=0; i<sz; ++i)
135 z.fastAccessCoeff(i) = value_rotator.SIGN(x.coeff(i), y.coeff(i));
144 #endif // _TEUCHOS_BLAS__MP_VECTOR_HPP_
Sacado::MP::Vector< Storage > ScalarType
void ROTG(ScalarType *da, ScalarType *db, ScalarType *c, ScalarType *s) const
ScalarType SIGN(ScalarType x, ScalarType y) const
Return ABS(x) if y > 0 or y is +0, else -ABS(x) (if y is -0 or < 0).