27 template<
typename Real_t>
51 APointer, &m, BPointer, &k, &beta, CPointer, &m);
55 template<
typename Real_t>
80 APointer, &k, BPointer, &k, &beta, CPointer, &m);
84 template<
typename Real_t>
97 for (
size_t j = 0; j < nSteps; ++j) {
98 size_t idx = workerID+j;
99 if (idx >= nElements)
break;
100 dataB[idx] *= dataA[idx];
108 for (
size_t i = 0; i < nElements ; i+= nSteps)
114 template<
typename Real_t>
132 &beta, BPointer, &inc);
136 template<
typename Real_t>
151 template<
typename Real_t>
161 template<
typename Real_t>
166 for (
size_t i = 0; i < B.size(); ++i) {
167 ScaleAdd(B[i], A[i], alpha);
172 template<
typename Real_t>
176 for (
size_t i = 0; i < B.size(); ++i) {
void Foreach(F func, unsigned nTimes)
Execute func (with no arguments) nTimes in parallel.
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 SumColumns(TCpuMatrix< Scalar_t > &B, const TCpuMatrix< Scalar_t > &A, Scalar_t alpha=1.0, Scalar_t beta=0.)
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)
static size_t GetNWorkItems(size_t nelements)
double beta(double x, double y)
Calculates the beta function.
size_t GetNElements() const
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 .
void MapFrom(Function_t &f, const TCpuMatrix &A)
Same as maps but takes the input values from the matrix A and writes the results in this matrix...
static ROOT::TThreadExecutor & GetThreadExecutor()
AFloat * GetRawDataPointer()
Return raw pointer to the elements stored contiguously in column-major order.
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.
void Copy(void *source, void *dest)
A pseudo container class which is a generator of indices.
Abstract ClassifierFactory template that handles arbitrary types.
static void TransposeMultiply(TCpuMatrix< Scalar_t > &output, const TCpuMatrix< Scalar_t > &input, const TCpuMatrix< Scalar_t > &Weights, Scalar_t alpha=1.0, Scalar_t beta=0.)
Matrix multiplication of two matrices A and B^T (transposed) with the result being written into C...