27 template<
typename Real_t>
32 int m = (int)
A.GetNrows();
33 int k = (int)
A.GetNcols();
34 int n = (int)
B.GetNcols();
42 const Real_t * APointer =
A.GetRawDataPointer();
43 const Real_t * BPointer =
B.GetRawDataPointer();
44 Real_t * CPointer =
C.GetRawDataPointer();
47 APointer, &
m, BPointer, &k, &
beta, CPointer, &
m);
51 template<
typename Real_t>
56 int m = (int)
A.GetNcols();
57 int k = (int)
A.GetNrows();
58 int n = (int)
B.GetNcols();
66 const Real_t *APointer =
A.GetRawDataPointer();
67 const Real_t *BPointer =
B.GetRawDataPointer();
68 Real_t *CPointer =
C.GetRawDataPointer();
71 APointer, &k, BPointer, &k, &
beta, CPointer, &
m);
75 template<
typename Real_t>
79 const Real_t *dataA =
A.GetRawDataPointer();
80 Real_t *dataB =
B.GetRawDataPointer();
82 auto f = [&dataA, &dataB](
UInt_t workerID)
84 dataB[workerID] *= dataA[workerID];
92 template<
typename Real_t>
96 int m = (int)
A.GetNrows();
97 int n = (int)
A.GetNcols();
104 const Real_t * APointer =
A.GetRawDataPointer();
105 Real_t * BPointer =
B.GetRawDataPointer();
109 &
beta, BPointer, &inc);
113 template<
typename Real_t>
118 int n = (int) (
A.GetNcols() *
A.GetNrows());
121 const Real_t *
x =
A.GetRawDataPointer();
128 template<
typename Real_t>
double beta(double x, double y)
Calculates the beta function.
void Gemm(const char *transa, const char *transb, const int *m, const int *n, const int *k, const Real_t *alpha, const Real_t *A, const int *lda, const Real_t *B, const int *ldb, const Real_t *beta, Real_t *C, const int *ldc)
Multiply the matrix A with the matrix B and store the result in C.
static void Multiply(TCpuMatrix< Scalar_t > &C, const TCpuMatrix< Scalar_t > &A, const TCpuMatrix< Scalar_t > &B)
Standard multiplication of two matrices A and B with the result being written into C...
static void Hadamard(TCpuMatrix< Scalar_t > &A, const TCpuMatrix< Scalar_t > &B)
In-place Hadamard (element-wise) product of matrices A and B with the result being written into A...
void Axpy(const int *n, const Real_t *alpha, const Real_t *x, const int *incx, Real_t *y, const int *incy)
Add the vector x scaled by alpha to y scaled by .
static void SumColumns(TCpuMatrix< Scalar_t > &B, const TCpuMatrix< Scalar_t > &A)
Sum columns of (m x n) matrixx A and write the results into the first m elements in A...
static void Copy(TCpuMatrix< Scalar_t > &B, const TCpuMatrix< Scalar_t > &A)
void Gemv(const char *trans, const int *m, const int *n, const Real_t *alpha, const Real_t *A, const int *lda, const Real_t *x, const int *incx, const Real_t *beta, Real_t *y, const int *incy)
Multiply the vector x with the matrix A and store the result in y.
A pseudo container class which is a generator of indices.
Abstract ClassifierFactory template that handles arbitrary types.
static void ScaleAdd(TCpuMatrix< Scalar_t > &A, const TCpuMatrix< Scalar_t > &B, Scalar_t beta=1.0)
Adds a the elements in matrix B scaled by c to the elements in the matrix A.
static void TransposeMultiply(TCpuMatrix< Scalar_t > &output, const TCpuMatrix< Scalar_t > &input, const TCpuMatrix< Scalar_t > &Weights)
Matrix multiplication of two matrices A and B^T (transposed) with the result being written into C...