Teuchos Package Browser (Single Doxygen Collection) Version of the Day
|
Default implementation for BLAS routines. More...
#include <Teuchos_BLAS.hpp>
Private Types | |
typedef Teuchos::ScalarTraits< ScalarType >::magnitudeType | MagnitudeType |
Constructor/Destructor. | |
DefaultBLASImpl (void) | |
Default constructor. | |
DefaultBLASImpl (const DefaultBLASImpl< OrdinalType, ScalarType > &) | |
Copy constructor. | |
virtual | ~DefaultBLASImpl (void) |
Destructor. | |
Default implementation for BLAS routines.
This class provides the default implementation for the BLAS routines. It is put in a separate class so that specializations of BLAS for other types still have this implementation available.
Definition at line 129 of file Teuchos_BLAS.hpp.
|
private |
Definition at line 132 of file Teuchos_BLAS.hpp.
typedef details::GivensRotator<ScalarType>::c_type Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::rotg_c_type |
The type used for c in ROTG.
This is MagnitudeType if ScalarType is complex and ScalarType otherwise.
Definition at line 154 of file Teuchos_BLAS.hpp.
|
inline |
Default constructor.
Definition at line 139 of file Teuchos_BLAS.hpp.
|
inline |
Copy constructor.
Definition at line 142 of file Teuchos_BLAS.hpp.
|
inlinevirtual |
Destructor.
Definition at line 145 of file Teuchos_BLAS.hpp.
void Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::ROTG | ( | ScalarType * | da, |
ScalarType * | db, | ||
rotg_c_type * | c, | ||
ScalarType * | s ) const |
Computes a Givens plane rotation.
Definition at line 516 of file Teuchos_BLAS.hpp.
void Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::ROT | ( | const OrdinalType & | n, |
ScalarType * | dx, | ||
const OrdinalType & | incx, | ||
ScalarType * | dy, | ||
const OrdinalType & | incy, | ||
MagnitudeType * | c, | ||
ScalarType * | s ) const |
Applies a Givens plane rotation.
Definition at line 527 of file Teuchos_BLAS.hpp.
void Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::SCAL | ( | const OrdinalType & | n, |
const ScalarType & | alpha, | ||
ScalarType * | x, | ||
const OrdinalType & | incx ) const |
Scale the vector x
by the constant alpha
.
Definition at line 554 of file Teuchos_BLAS.hpp.
void Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::COPY | ( | const OrdinalType & | n, |
const ScalarType * | x, | ||
const OrdinalType & | incx, | ||
ScalarType * | y, | ||
const OrdinalType & | incy ) const |
Copy the vector x
to the vector y
.
Definition at line 572 of file Teuchos_BLAS.hpp.
void Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::AXPY | ( | const OrdinalType & | n, |
const alpha_type | alpha, | ||
const x_type * | x, | ||
const OrdinalType & | incx, | ||
ScalarType * | y, | ||
const OrdinalType & | incy ) const |
Perform the operation: y
<-
y+alpha*x
.
Definition at line 593 of file Teuchos_BLAS.hpp.
ScalarTraits< ScalarType >::magnitudeType Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::ASUM | ( | const OrdinalType & | n, |
const ScalarType * | x, | ||
const OrdinalType & | incx ) const |
Sum the absolute values of the entries of x
.
Definition at line 614 of file Teuchos_BLAS.hpp.
ScalarType Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::DOT | ( | const OrdinalType & | n, |
const x_type * | x, | ||
const OrdinalType & | incx, | ||
const y_type * | y, | ||
const OrdinalType & | incy ) const |
Form the dot product of the vectors x
and y
.
Definition at line 638 of file Teuchos_BLAS.hpp.
ScalarTraits< ScalarType >::magnitudeType Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::NRM2 | ( | const OrdinalType & | n, |
const ScalarType * | x, | ||
const OrdinalType & | incx ) const |
Compute the 2-norm of the vector x
.
Definition at line 661 of file Teuchos_BLAS.hpp.
OrdinalType Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::IAMAX | ( | const OrdinalType & | n, |
const ScalarType * | x, | ||
const OrdinalType & | incx ) const |
Return the index of the element of x
with the maximum magnitude.
Definition at line 682 of file Teuchos_BLAS.hpp.
void Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::GEMV | ( | ETransp | trans, |
const OrdinalType & | m, | ||
const OrdinalType & | n, | ||
const alpha_type | alpha, | ||
const A_type * | A, | ||
const OrdinalType & | lda, | ||
const x_type * | x, | ||
const OrdinalType & | incx, | ||
const beta_type | beta, | ||
ScalarType * | y, | ||
const OrdinalType & | incy ) const |
Performs the matrix-vector operation: y
<-
alpha*A*x+beta*y
or y
<-
alpha*A'*x+beta*y
where A
is a general m
by n
matrix.
Definition at line 718 of file Teuchos_BLAS.hpp.
void Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::TRMV | ( | EUplo | uplo, |
ETransp | trans, | ||
EDiag | diag, | ||
const OrdinalType & | n, | ||
const A_type * | A, | ||
const OrdinalType & | lda, | ||
ScalarType * | x, | ||
const OrdinalType & | incx ) const |
Performs the matrix-vector operation: x
<-
A*x
or x
<-
A'*x
where A
is a unit/non-unit n
by n
upper/lower triangular matrix.
Definition at line 871 of file Teuchos_BLAS.hpp.
void Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::GER | ( | const OrdinalType & | m, |
const OrdinalType & | n, | ||
const alpha_type | alpha, | ||
const x_type * | x, | ||
const OrdinalType & | incx, | ||
const y_type * | y, | ||
const OrdinalType & | incy, | ||
ScalarType * | A, | ||
const OrdinalType & | lda ) const |
Performs the rank 1 operation: A
<-
alpha*x*y'+A
.
Definition at line 1066 of file Teuchos_BLAS.hpp.
void Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::GEMM | ( | ETransp | transa, |
ETransp | transb, | ||
const OrdinalType & | m, | ||
const OrdinalType & | n, | ||
const OrdinalType & | k, | ||
const alpha_type | alpha, | ||
const A_type * | A, | ||
const OrdinalType & | lda, | ||
const B_type * | B, | ||
const OrdinalType & | ldb, | ||
const beta_type | beta, | ||
ScalarType * | C, | ||
const OrdinalType & | ldc ) const |
General matrix-matrix multiply.
This computes C = alpha*op(A)*op(B) + beta*C. op(X) here may be either X, the transpose of X, or the conjugate transpose of X. op(A) has m rows and k columns, op(B) has k rows and n columns, and C has m rows and n columns.
Definition at line 1141 of file Teuchos_BLAS.hpp.
void Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::SWAP | ( | const OrdinalType & | n, |
ScalarType *const | x, | ||
const OrdinalType & | incx, | ||
ScalarType *const | y, | ||
const OrdinalType & | incy ) const |
Swap the entries of x and y.
Definition at line 1387 of file Teuchos_BLAS.hpp.
void Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::SYMM | ( | ESide | side, |
EUplo | uplo, | ||
const OrdinalType & | m, | ||
const OrdinalType & | n, | ||
const alpha_type | alpha, | ||
const A_type * | A, | ||
const OrdinalType & | lda, | ||
const B_type * | B, | ||
const OrdinalType & | ldb, | ||
const beta_type | beta, | ||
ScalarType * | C, | ||
const OrdinalType & | ldc ) const |
void Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::SYRK | ( | EUplo | uplo, |
ETransp | trans, | ||
const OrdinalType & | n, | ||
const OrdinalType & | k, | ||
const alpha_type | alpha, | ||
const A_type * | A, | ||
const OrdinalType & | lda, | ||
const beta_type | beta, | ||
ScalarType * | C, | ||
const OrdinalType & | ldc ) const |
void Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::TRMM | ( | ESide | side, |
EUplo | uplo, | ||
ETransp | transa, | ||
EDiag | diag, | ||
const OrdinalType & | m, | ||
const OrdinalType & | n, | ||
const alpha_type | alpha, | ||
const A_type * | A, | ||
const OrdinalType & | lda, | ||
ScalarType * | B, | ||
const OrdinalType & | ldb ) const |
void Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >::TRSM | ( | ESide | side, |
EUplo | uplo, | ||
ETransp | transa, | ||
EDiag | diag, | ||
const OrdinalType & | m, | ||
const OrdinalType & | n, | ||
const alpha_type | alpha, | ||
const A_type * | A, | ||
const OrdinalType & | lda, | ||
ScalarType * | B, | ||
const OrdinalType & | ldb ) const |