Namespaces | Enumerations
cblas_base.h File Reference

O2scl basic linear algebra function templates. More...

Go to the source code of this file.

Namespaces

 o2scl_cblas
 Namespace for O2scl CBLAS function templates.
 

Enumerations

enum  o2scl_cblas::o2cblas_order { o2cblas_RowMajor =101, o2cblas_ColMajor =102 }
 Matrix order, either column-major or row-major.
 
enum  o2scl_cblas::o2cblas_transpose { o2cblas_NoTrans =111, o2cblas_Trans =112, o2cblas_ConjTrans =113 }
 Transpose operations.
 
enum  o2scl_cblas::o2cblas_uplo { o2cblas_Upper =121, o2cblas_Lower =122 }
 Upper- or lower-triangular.
 
enum  o2scl_cblas::o2cblas_diag { o2cblas_NonUnit =131, o2cblas_Unit =132 }
 Unit or generic diagonal.
 
enum  o2scl_cblas::o2cblas_side { o2cblas_Left =141, o2cblas_Right =142 }
 Left or right sided operation.
 

Functions

Level-1 BLAS functions
template<class vec_t >
double o2scl_cblas::dasum (const size_t N, const vec_t &X)
 Compute the absolute sum of vector elements. More...
 
template<class vec_t , class vec2_t >
void o2scl_cblas::daxpy (const double alpha, const size_t N, const vec_t &X, vec2_t &Y)
 Compute $ y= \alpha x+y $. More...
 
template<class vec_t , class vec2_t >
double o2scl_cblas::ddot (const size_t N, const vec_t &X, const vec2_t &Y)
 Compute $ r=x \cdot y $.
 
template<class vec_t >
double o2scl_cblas::dnrm2 (const size_t N, const vec_t &X)
 Compute the norm of the vector X. More...
 
template<class vec_t >
void o2scl_cblas::dscal (const double alpha, const size_t N, vec_t &X)
 Compute $ x=\alpha x $.
 
Level-2 BLAS functions
template<class mat_t , class vec_t , class vec2_t >
void o2scl_cblas::dgemv (const enum o2cblas_order order, const enum o2cblas_transpose TransA, const size_t M, const size_t N, const double alpha, const mat_t &A, const vec_t &X, const double beta, vec2_t &Y)
 Compute $ y=\alpha \left[\mathrm{op}(A)\right] x+ \beta y $. More...
 
template<class mat_t , class vec_t >
void o2scl_cblas::dtrsv (const enum o2cblas_order order, const enum o2cblas_uplo Uplo, const enum o2cblas_transpose TransA, const enum o2cblas_diag Diag, const size_t M, const size_t N, const mat_t &A, vec_t &X)
 Compute $ x=\mathrm{op} (A)^{-1} x $. More...
 
template<class mat_t , class vec_t >
void o2scl_cblas::dtrmv (const enum o2cblas_order Order, const enum o2cblas_uplo Uplo, const enum o2cblas_transpose TransA, const enum o2cblas_diag Diag, const size_t N, const mat_t &A, vec_t &x)
 Compute $ x=op(A) x $ for the triangular matrix A.
 
Level-3 BLAS functions
template<class mat_t >
void o2scl_cblas::dgemm (const enum o2cblas_order Order, const enum o2cblas_transpose TransA, const enum o2cblas_transpose TransB, const size_t M, const size_t N, const size_t K, const double alpha, const mat_t &A, const mat_t &B, const double beta, mat_t &C)
 Compute $ y=\alpha \mathrm{op}(A) \mathrm{op}(B) + \beta C $.
 
Helper BLAS functions - Subvectors
template<class vec_t , class vec2_t >
void o2scl_cblas::daxpy_subvec (const double alpha, const size_t N, const vec_t &X, vec2_t &Y, const size_t ie)
 Compute $ y=\alpha x+y $ beginning with index ie and ending with index N-1. More...
 
template<class vec_t , class vec2_t >
double o2scl_cblas::ddot_subvec (const size_t N, const vec_t &X, const vec2_t &Y, const size_t ie)
 Compute $ r=x \cdot y $ beginning with index ie and ending with index N-1. More...
 
template<class vec_t >
double o2scl_cblas::dnrm2_subvec (const size_t N, const vec_t &X, const size_t ie)
 Compute the norm of the vector X beginning with index ie and ending with index N-1. More...
 
template<class vec_t >
void o2scl_cblas::dscal_subvec (const double alpha, const size_t N, vec_t &X, const size_t ie)
 Compute $ x=\alpha x $ beginning with index ie and ending with index N-1. More...
 
Helper BLAS functions - Subcolums of a matrix
template<class mat_t , class vec_t >
void o2scl_cblas::daxpy_subcol (const double alpha, const size_t M, const mat_t &X, const size_t ir, const size_t ic, vec_t &y)
 Compute $ y=\alpha x+y $ for a subcolumn of a matrix. More...
 
template<class mat_t , class vec_t >
double o2scl_cblas::ddot_subcol (const size_t M, const mat_t &X, const size_t ir, const size_t ic, const vec_t &y)
 Compute $ r=x \cdot y $ for a subcolumn of a matrix. More...
 
template<class mat_t >
double o2scl_cblas::dnrm2_subcol (const mat_t &A, const size_t ir, const size_t ic, const size_t M)
 Compute the norm of a subcolumn of a matrix. More...
 
template<class mat_t >
void o2scl_cblas::dscal_subcol (mat_t &A, const size_t ir, const size_t ic, const size_t M, const double alpha)
 Compute $ x=\alpha x $ for a subcolumn of a matrix. More...
 
template<class mat_t >
double o2scl_cblas::dasum_subcol (mat_t &A, const size_t ir, const size_t ic, const size_t M)
 Compute $ x=\alpha x $ for a subcolumn of a matrix. More...
 
Helper BLAS functions - Subrows of a matrix
template<class mat_t , class vec_t >
void o2scl_cblas::daxpy_subrow (const double alpha, const size_t N, const mat_t &X, const size_t ir, const size_t ic, vec_t &Y)
 Compute $ y=\alpha x+y $ for a subrow of a matrix. More...
 
template<class mat_t , class vec_t >
double o2scl_cblas::ddot_subrow (const size_t N, const mat_t &X, const size_t ir, const size_t ic, const vec_t &Y)
 Compute $ r=x \cdot y $ for a subrow of a matrix. More...
 
template<class mat_t >
double o2scl_cblas::dnrm2_subrow (const mat_t &M, const size_t ir, const size_t ic, const size_t N)
 Compute the norm of a subrow of a matrix. More...
 
template<class mat_t >
void o2scl_cblas::dscal_subrow (mat_t &A, const size_t ir, const size_t ic, const size_t N, const double alpha)
 Compute $ x=\alpha x $ for a subrow of a matrix. More...
 

Detailed Description

See o2scl_cblas for more documentation on these functions.

Idea for Future:

Add float and complex versions?

There are some Level-1 BLAS functions which are already present in vector.h. Should we move all of them to one place or the other? The ones in vector.h are generic in the sense that they can use doubles or floats, but the ones here can use either () or [].

Definition in file cblas_base.h.

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).