Namespace for O2scl CBLAS function templates. More...
Enumerations | |
enum | o2cblas_order { o2cblas_RowMajor =101, o2cblas_ColMajor =102 } |
Matrix order, either column-major or row-major. | |
enum | o2cblas_transpose { o2cblas_NoTrans =111, o2cblas_Trans =112, o2cblas_ConjTrans =113 } |
Transpose operations. | |
enum | o2cblas_uplo { o2cblas_Upper =121, o2cblas_Lower =122 } |
Upper- or lower-triangular. | |
enum | o2cblas_diag { o2cblas_NonUnit =131, o2cblas_Unit =132 } |
Unit or generic diagonal. | |
enum | o2cblas_side { o2cblas_Left =141, o2cblas_Right =142 } |
Left or right sided operation. | |
These functions are only intended as a fallback for situations where an optimized BLAS is not available.
Level-1 BLAS functions
Some functionality which would otherwise appear here is already given in vector.h.
dcopy()
is given in vector_copy() except that the ordering is reversed (in vector_copy() the source preceeds the destination in the function argument list).dswap()
is given in vector_swap().idamax()
is given in vector_max_index().Level-2 BLAS functions
Currently only dgemv(), dtrmv(), and dtrsv() are implemented.
Level-3 BLAS functions
Currently only dgemm() and dtrsm() are implemented.
Helper BLAS functions
There are several basic BLAS functions which are helpful to operate on only a part of a vector or matrix to ensure that the linear algebra routines are flexible with the types that they can handle.
The subvector functions operate only one set of adjacent vector elements. For a vector defined by with
the functions with suffix subvec
operate only on elements from to
(inclusive).
The subcolumn functions operate only on a part of a column of a matrix. For a matrix defined by
the functions with suffix subcol
operate only on elements in the column from to
inclusive.
The subrow functions operate only on a part of a row of a matrix. For a matrix defined by
the functions with suffix subrow
operate only on elements in the column from to
inclusive.
This namespace is documented inside src/linalg/cblas.h
.
double o2scl_cblas::dasum | ( | const size_t | N, |
const vec_t & | X | ||
) |
If alpha
is zero, this function returns and performs no computations.
Definition at line 111 of file cblas_base.h.
double o2scl_cblas::dasum_subcol | ( | mat_t & | A, |
const size_t | ir, | ||
const size_t | ic, | ||
const size_t | M | ||
) |
Given the matrix A
, define the vector x
as the column with index ic
. This function computes for elements in the vectors
x
from row ir
to row
(inclusive). All other elements in M-1
x
are not referenced.
Used in householder_transform_subcol().
Definition at line 1437 of file cblas_base.h.
void o2scl_cblas::daxpy | ( | const double | alpha, |
const size_t | N, | ||
const vec_t & | X, | ||
vec2_t & | Y | ||
) |
If alpha
is zero, this function returns and performs no computations.
Definition at line 125 of file cblas_base.h.
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 | ||
) |
Given the matrix X
, define the vector x
as the column with index ic
. This function computes for elements in the vectors
x
and y
from row ir
to row
(inclusive). All other elements in M-1
x
and y
are not referenced.
Used in householder_hv_sub().
Definition at line 1265 of file cblas_base.h.
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 | ||
) |
Given the matrix X
, define the vector x
as the row with index ir
. This function computes for elements in the vectors
x
from column ic
to column
(inclusive). All other elements in N-1
x
and y
are not referenced.
If ic
is greater than N-1
then the error handler will be called if O2SCL_NO_RANGE_CHECK
is not defined.
Used in householder_hv_sub().
Definition at line 1483 of file cblas_base.h.
void o2scl_cblas::daxpy_subvec | ( | const double | alpha, |
const size_t | N, | ||
const vec_t & | X, | ||
vec2_t & | Y, | ||
const size_t | ie | ||
) |
This function is used in householder_hv().
If alpha
is identical with zero or N==ie
, this function will perform no calculations and return without calling the error handler.
If ie
is greater than N-1
then the error handler will be called if O2SCL_NO_RANGE_CHECK
is not defined.
Definition at line 1103 of file cblas_base.h.
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 | ||
) |
Given the matrix X
, define the vector x
as the column with index ic
. This function computes for elements in the vectors
x
and y
from row ir
to row
(inclusive). All other elements in M-1
x
and y
are not referenced.
Used in householder_hv_sub().
Definition at line 1307 of file cblas_base.h.
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 | ||
) |
Given the matrix X
, define the vector x
as the row with index ir
. This function computes for elements in the vectors
x
from column ic
to column
(inclusive). All other elements in N-1
x
and y
are not referenced.
If ic
is greater than N-1
then the error handler will be called if O2SCL_NO_RANGE_CHECK
is not defined.
Used in householder_hv_sub().
Definition at line 1529 of file cblas_base.h.
double o2scl_cblas::ddot_subvec | ( | const size_t | N, |
const vec_t & | X, | ||
const vec2_t & | Y, | ||
const size_t | ie | ||
) |
This function is used in householder_hv().
If ie
is greater than N-1
then the error handler will be called if O2SCL_NO_RANGE_CHECK
is not defined.
Definition at line 1140 of file cblas_base.h.
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 | ||
) |
When both TransA
and TransB
are NoTrans
, this function operates on the first M rows and K columns of matrix A, and the first K rows and N columns of matrix B to produce a matrix C with M rows and N columns.
This function works for all values of Order
, TransA
, and TransB
.
Definition at line 604 of file cblas_base.h.
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 | ||
) |
If M
or N
is zero, or if alpha
is zero and beta
is one, this function performs no calculations and returns without calling the error handler.
Definition at line 245 of file cblas_base.h.
double o2scl_cblas::dnrm2 | ( | const size_t | N, |
const vec_t & | X | ||
) |
If N
is less than or equal to zero, this function returns zero without calling the error handler.
This function works only with vectors which hold double
. For the norm of a general floating point vector, see vector_norm().
Definition at line 183 of file cblas_base.h.
double o2scl_cblas::dnrm2_subcol | ( | const mat_t & | A, |
const size_t | ir, | ||
const size_t | ic, | ||
const size_t | M | ||
) |
Given the matrix A
, define the vector x
as the column with index ic
. This function computes the norm of the part of x
from row ir
to row
(inclusive). All other elements in M-1
x
are not referenced.
if M
is zero, then this function silently returns zero without calling the error handler.
This function is used in householder_transform_subcol().
Definition at line 1350 of file cblas_base.h.
double o2scl_cblas::dnrm2_subrow | ( | const mat_t & | M, |
const size_t | ir, | ||
const size_t | ic, | ||
const size_t | N | ||
) |
Given the matrix X
, define the vector x
as the row with index ir
. This function computes the norm of the part of x
from column ic
to column
(inclusive). All other elements in N-1
x
are not referenced.
Definition at line 1568 of file cblas_base.h.
double o2scl_cblas::dnrm2_subvec | ( | const size_t | N, |
const vec_t & | X, | ||
const size_t | ie | ||
) |
Used in householder_transform().
If ie
is greater than N-1
then the error handler will be called if O2SCL_NO_RANGE_CHECK
is not defined.
Definition at line 1181 of file cblas_base.h.
void o2scl_cblas::dscal_subcol | ( | mat_t & | A, |
const size_t | ir, | ||
const size_t | ic, | ||
const size_t | M, | ||
const double | alpha | ||
) |
Given the matrix A
, define the vector x
as the column with index ic
. This function computes for elements in the vectors
x
from row ir
to row
(inclusive). All other elements in M-1
x
are not referenced.
Used in householder_transform_subcol().
Definition at line 1399 of file cblas_base.h.
void o2scl_cblas::dscal_subrow | ( | mat_t & | A, |
const size_t | ir, | ||
const size_t | ic, | ||
const size_t | N, | ||
const double | alpha | ||
) |
Given the matrix A
, define the vector x
as the row with index ir
. This function computes for elements in the vectors
x
from column ic
to column
(inclusive). All other elements in N-1
x
and y
are not referenced.
If ic
is greater than N-1
then the error handler will be called if O2SCL_NO_RANGE_CHECK
is not defined.
Definition at line 1611 of file cblas_base.h.
void o2scl_cblas::dscal_subvec | ( | const double | alpha, |
const size_t | N, | ||
vec_t & | X, | ||
const size_t | ie | ||
) |
This function is used in householder_transform().
If ie
is greater than N-1
then the error handler will be called if O2SCL_NO_RANGE_CHECK
is not defined.
Definition at line 1226 of file cblas_base.h.
void o2scl_cblas::dtrsm | ( | const enum o2cblas_order | Order, |
const enum o2cblas_side | Side, | ||
const enum o2cblas_uplo | Uplo, | ||
const enum o2cblas_transpose | TransA, | ||
const enum o2cblas_diag | Diag, | ||
const size_t | M, | ||
const size_t | N, | ||
const double | alpha, | ||
const mat_t & | A, | ||
mat_t & | B | ||
) |
This function works for all values of Order
, Side
, Uplo
, TransA
, and Diag
. The variable Side
is Left
when A is on the left
This function operates on the first M rows and N columns of the matrix B. If Side is Left, then this function operates on the first M rows and M columns of A. If Side is Right, then this function operates on the first N rows and N columns of A.
Definition at line 815 of file cblas_base.h.
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 | ||
) |
If N
is zero, this function does nothing and returns zero.
Definition at line 335 of file cblas_base.h.
bool o2scl_cblas::matrix_is_finite | ( | mat_t & | data | ) |
If n
is zero, this will return true without throwing an exception.
Definition at line 99 of file cblas_base.h.
bool o2scl_cblas::matrix_is_finite | ( | size_t | m, |
size_t | n, | ||
mat_t & | data | ||
) |
If n
is zero, this will return true without throwing an exception.
Definition at line 85 of file cblas_base.h.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).