 |
fml
0.1-0
Fused Matrix Library
|
5 #ifndef FML_PAR_CPU_LINALG_BLAS_H
6 #define FML_PAR_CPU_LINALG_BLAS_H
10 #include "../../../cpu/linalg/linalg_blas.hh"
12 #include "../parmat.hh"
36 template <
typename REAL>
40 linalg::matmult(
false,
false, (REAL)1.0, x.data_obj(), y, ret.data_obj());
44 template <
typename REAL>
52 template <
typename REAL>
56 linalg::matmult(
true,
false, (REAL)1.0, x.data_obj(), y.data_obj(), ret);
61 template <
typename REAL>
87 template <
typename REAL>
90 const len_t n = x.ncols();
96 comm r = x.get_comm();
101 template <
typename REAL>
104 const len_t n = x.ncols();
Matrix class for data held on a single CPU.
Definition: cpumat.hh:36
void crossprod(const REAL alpha, const cpumat< REAL > &x, cpumat< REAL > &ret)
Computes lower triangle of alpha*x^T*x.
Definition: crossprod.hh:37
void allreduce(int n, T *data, MPI_Op op=MPI_SUM) const
Sum reduce operation across all processes in the MPI communicator.
Definition: comm.hh:357
len_t nrows() const
Number of rows.
Definition: unimat.hh:36
void resize(len_t nrows, len_t ncols)
Resize the internal object storage.
Definition: cpumat.hh:233
len_t ncols() const
Number of columns.
Definition: unimat.hh:38
MPI communicator data and helpers.
Definition: comm.hh:24
REAL * data_ptr()
Pointer to the internal array.
Definition: unimat.hh:40
Core namespace.
Definition: dimops.hh:10
void matmult(const bool transx, const bool transy, const REAL alpha, const cpumat< REAL > &x, const cpumat< REAL > &y, cpumat< REAL > &ret)
Computes ret = alpha*op(x)*op(y) where op(A) is A or A^T.
Definition: matmult.hh:43