|
XCSF 1.4.8
XCSF learning classifier system
|
Basic linear algebra functions. More...
#include "blas.h"Go to the source code of this file.
Functions | |
| static void | gemm_nn (const int M, const int N, const int K, const double ALPHA, const double *A, const int lda, const double *B, const int ldb, double *C, const int ldc) |
| static void | gemm_nt (const int M, const int N, const int K, const double ALPHA, const double *A, const int lda, const double *B, const int ldb, double *C, const int ldc) |
| static void | gemm_tn (const int M, const int N, const int K, const double ALPHA, const double *A, const int lda, const double *B, const int ldb, double *C, const int ldc) |
| static void | gemm_tt (const int M, const int N, const int K, const double ALPHA, const double *A, const int lda, const double *B, const int ldb, double *C, const int ldc) |
| 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 \). | |
| 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. | |
| 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. | |
| void | blas_fill (const int N, const double ALPHA, double *X, const int INCX) |
| Fills the vector X with the value ALPHA. | |
| 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. | |
| 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. | |
| double | blas_sum (const double *X, const int N) |
| Returns the sum of the vector X. | |
| 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.
| [in] | N | The number of elements in vectors X and Y. |
| [in] | ALPHA | Scalar used for multiplication. |
| [in] | X | Vector with N elements. |
| [in] | INCX | Stride between consecutive elements of X. |
| [in,out] | Y | Vector with N elements. |
| [in] | INCY | Stride 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().
| 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.
| [in] | N | The number of elements in vectors X and Y. |
| [in] | X | Vector with N elements. |
| [in] | INCX | Stride between consecutive elements of X. |
| [in] | Y | Vector with N elements. |
| [in] | INCY | Stride between consecutive elements of Y. |
Definition at line 198 of file blas.c.
Referenced by pred_nlms_compute(), pred_nlms_update(), pred_rls_compute(), and pred_rls_update().
| void blas_fill | ( | const int | N, |
| const double | ALPHA, | ||
| double * | X, | ||
| const int | INCX | ||
| ) |
Fills the vector X with the value ALPHA.
| [in] | N | The number of elements in vector X. |
| [in] | ALPHA | The value to fill the vector. |
| [out] | X | Vector with N elements. |
| [in] | INCX | Stride between consecutive elements of X. |
Definition at line 181 of file blas.c.
Referenced by pred_nlms_init(), and pred_rls_init().
| 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 \).
| [in] | TA | Operation op(A) that is non- or (conj.) transpose. |
| [in] | TB | Operation op(B) that is non- or (conj.) transpose. |
| [in] | M | Number of rows of matrix op(A) and C. |
| [in] | N | Number of columns of matrix op(B) and C. |
| [in] | K | Number of columns of op(A) and rows of op(B). |
| [in] | ALPHA | Scalar used for multiplication. |
| [in] | A | Array of dimension lda × K with lda >= max(1,M) if TA=0 and lda × M with lda >= max(1,K) otherwise. |
| [in] | lda | Leading dimension of a 2-D array used to store the matrix A. |
| [in] | B | Array of dimension ldb × N with ldb >= max(1,K) if TB=0 and ldb × K with ldb >= max(1,N) otherwise. |
| [in] | ldb | Leading dimension of a 2-D array used to store the matrix B. |
| [in] | BETA | Scalar used for multiplication. |
| [in,out] | C | Array of dimension ldc × N with ldc >= max(1,M). |
| [in] | ldc | Leading 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().
| 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.
| [in] | N | The number of elements in vectors X and Y. |
| [in] | X | Vector with N elements. |
| [in] | INCX | Stride between consecutive elements of X. |
| [in,out] | Y | Vector with N elements. |
| [in] | INCY | Stride between consecutive elements of Y. |
Definition at line 217 of file blas.c.
Referenced by neural_layer_lstm_backward(), and neural_layer_lstm_forward().
| 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.
| [in] | N | The number of elements in vector X. |
| [in] | ALPHA | Scalar used for multiplication. |
| [in,out] | X | Vector with N elements. |
| [in] | INCX | Stride 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().
| double blas_sum | ( | const double * | X, |
| const int | N | ||
| ) |
Returns the sum of the vector X.
| [in] | X | Vector with N elements. |
| [in] | N | The number of elements in vector X. |
Definition at line 232 of file blas.c.
Referenced by neural_layer_convolutional_backward().
|
static |
Definition at line 27 of file blas.c.
Referenced by blas_gemm().
|
static |
Definition at line 42 of file blas.c.
Referenced by blas_gemm().
|
static |
Definition at line 58 of file blas.c.
Referenced by blas_gemm().
|
static |
Definition at line 73 of file blas.c.
Referenced by blas_gemm().