XCSF  1.4.7
XCSF learning classifier system
blas.h File Reference

Basic linear algebra functions. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void blas_gemm (const int TA, const int TB, const int M, const int N, const int K, const double ALPHA, const double *A, const int lda, const double *B, const int ldb, const double BETA, double *C, const int ldc)
 Performs the matrix-matrix multiplication: \( C = \alpha \mbox{op}(A) \mbox{op}(B) + \beta C \). More...
 
void blas_axpy (const int N, const double ALPHA, const double *X, const int INCX, double *Y, const int INCY)
 Multiplies vector X by the scalar ALPHA and adds it to the vector Y. More...
 
void blas_mul (const int N, const double *X, const int INCX, double *Y, const int INCY)
 Multiplies vector X by the vector Y and stores the result in vector Y. More...
 
void blas_scal (const int N, const double ALPHA, double *X, const int INCX)
 Scales vector X by the scalar ALPHA and overwrites it with the result. More...
 
void blas_fill (const int N, const double ALPHA, double *X, const int INCX)
 Fills the vector X with the value ALPHA. More...
 
double blas_dot (const int N, const double *X, const int INCX, const double *Y, const int INCY)
 Computes the dot product of two vectors. More...
 
double blas_sum (const double *X, const int N)
 Returns the sum of the vector X. More...
 

Detailed Description

Basic linear algebra functions.

Author
Richard Preen rpree.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om
Date
2020.

Definition in file blas.h.

Function Documentation

◆ blas_axpy()

void blas_axpy ( const int  N,
const double  ALPHA,
const double *  X,
const int  INCX,
double *  Y,
const int  INCY 
)

Multiplies vector X by the scalar ALPHA and adds it to the vector Y.

Parameters
[in]NThe number of elements in vectors X and Y.
[in]ALPHAScalar used for multiplication.
[in]XVector with N elements.
[in]INCXStride between consecutive elements of X.
[in,out]YVector with N elements.
[in]INCYStride between consecutive elements of Y.

Definition at line 138 of file blas.c.

Referenced by neural_layer_connected_backward(), neural_layer_connected_update(), neural_layer_convolutional_update(), neural_layer_lstm_backward(), neural_layer_lstm_forward(), neural_layer_recurrent_forward(), pred_nlms_update(), and pred_rls_update().

Here is the caller graph for this function:

◆ blas_dot()

double blas_dot ( const int  N,
const double *  X,
const int  INCX,
const double *  Y,
const int  INCY 
)

Computes the dot product of two vectors.

Parameters
[in]NThe number of elements in vectors X and Y.
[in]XVector with N elements.
[in]INCXStride between consecutive elements of X.
[in]YVector with N elements.
[in]INCYStride between consecutive elements of Y.
Returns
The resulting dot product.

Definition at line 198 of file blas.c.

Referenced by pred_nlms_compute(), pred_nlms_update(), pred_rls_compute(), and pred_rls_update().

Here is the caller graph for this function:

◆ blas_fill()

void blas_fill ( const int  N,
const double  ALPHA,
double *  X,
const int  INCX 
)

Fills the vector X with the value ALPHA.

Parameters
[in]NThe number of elements in vector X.
[in]ALPHAThe value to fill the vector.
[out]XVector with N elements.
[in]INCXStride between consecutive elements of X.

Definition at line 181 of file blas.c.

Referenced by pred_nlms_init(), and pred_rls_init().

Here is the caller graph for this function:

◆ blas_gemm()

void blas_gemm ( const int  TA,
const int  TB,
const int  M,
const int  N,
const int  K,
const double  ALPHA,
const double *  A,
const int  lda,
const double *  B,
const int  ldb,
const double  BETA,
double *  C,
const int  ldc 
)

Performs the matrix-matrix multiplication: \( C = \alpha \mbox{op}(A) \mbox{op}(B) + \beta C \).

Parameters
[in]TAOperation op(A) that is non- or (conj.) transpose.
[in]TBOperation op(B) that is non- or (conj.) transpose.
[in]MNumber of rows of matrix op(A) and C.
[in]NNumber of columns of matrix op(B) and C.
[in]KNumber of columns of op(A) and rows of op(B).
[in]ALPHAScalar used for multiplication.
[in]AArray of dimension lda × K with lda >= max(1,M) if TA=0 and lda × M with lda >= max(1,K) otherwise.
[in]ldaLeading dimension of a 2-D array used to store the matrix A.
[in]BArray of dimension ldb × N with ldb >= max(1,K) if TB=0 and ldb × K with ldb >= max(1,N) otherwise.
[in]ldbLeading dimension of a 2-D array used to store the matrix B.
[in]BETAScalar used for multiplication.
[in,out]CArray of dimension ldc × N with ldc >= max(1,M).
[in]ldcLeading dimension of a 2-D array used to store the matrix C.

Definition at line 108 of file blas.c.

References gemm_nn(), gemm_nt(), gemm_tn(), and gemm_tt().

Referenced by neural_layer_connected_backward(), neural_layer_connected_forward(), neural_layer_convolutional_backward(), neural_layer_convolutional_forward(), and pred_rls_update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ blas_mul()

void blas_mul ( const int  N,
const double *  X,
const int  INCX,
double *  Y,
const int  INCY 
)

Multiplies vector X by the vector Y and stores the result in vector Y.

Parameters
[in]NThe number of elements in vectors X and Y.
[in]XVector with N elements.
[in]INCXStride between consecutive elements of X.
[in,out]YVector with N elements.
[in]INCYStride between consecutive elements of Y.

Definition at line 217 of file blas.c.

Referenced by neural_layer_lstm_backward(), and neural_layer_lstm_forward().

Here is the caller graph for this function:

◆ blas_scal()

void blas_scal ( const int  N,
const double  ALPHA,
double *  X,
const int  INCX 
)

Scales vector X by the scalar ALPHA and overwrites it with the result.

Parameters
[in]NThe number of elements in vector X.
[in]ALPHAScalar used for multiplication.
[in,out]XVector with N elements.
[in]INCXStride between consecutive elements of X.

Definition at line 160 of file blas.c.

Referenced by neural_layer_connected_update(), neural_layer_convolutional_update(), and pred_rls_update().

Here is the caller graph for this function:

◆ blas_sum()

double blas_sum ( const double *  X,
const int  N 
)

Returns the sum of the vector X.

Parameters
[in]XVector with N elements.
[in]NThe number of elements in vector X.
Returns
The resulting sum.

Definition at line 232 of file blas.c.

Referenced by neural_layer_convolutional_backward().

Here is the caller graph for this function: