Go to the source code of this file.
|
template<unsigned int numberOfRows, unsigned int numberOfColumns> |
std::ostream & | operator<< (std::ostream &os, const SmallMatrix< numberOfRows, numberOfColumns > &A) |
| Writes nicely formatted entries of the Matrix A to the stream os. More...
|
|
template<unsigned int numberOfRows, unsigned int numberOfColumns> |
SmallMatrix< numberOfRows, numberOfColumns > | operator* (const Mdouble d, const SmallMatrix< numberOfRows, numberOfColumns > &mat) |
| Multiplies a matrix with a Mdouble. More...
|
|
template<unsigned int numberOfRows, unsigned int numberOfColumns> |
SmallVector< numberOfColumns > | operator* (SmallVector< numberOfRows > &vec, SmallMatrix< numberOfRows, numberOfColumns > &mat) |
| Multiplies a matrix with a vector. More...
|
|
◆ operator*() [1/2]
template<unsigned int numberOfRows, unsigned int numberOfColumns>
Multiplies a matrix with a Mdouble.
◆ operator*() [2/2]
template<unsigned int numberOfRows, unsigned int numberOfColumns>
Multiplies a matrix with a vector.
339 if (numberOfColumns == 0)
341 logger(
WARN,
"Trying to multiply a vector with a matrix without any columns.");
344 int nr = numberOfRows;
345 int nc = numberOfColumns;
353 logger(
DEBUG,
"Matrix size: % x % \n Vector size: %", nr, nc, vec.
size());
355 dgemv_(
"T", &nr, &nc, &d_one,
mat.
data(), &nr, vec.
data(), &i_one, &d_zero, result.
data(), &i_one);
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
LL< Log::WARN > WARN
Warning log level.
Definition: Logger.cc:33
void dgemv_(const char *trans, int *m, int *n, double *alpha, double *A, int *LDA, double *x, int *incx, double *beta, double *y, int *incy)
This does matrix times vector and is from blas level 2.
constexpr Storage & data()
Definition: SparseMatrix.h:205
Definition: SmallVector.h:42
unsigned int size() const
Definition: SmallVector.h:213
const Mdouble * data() const
Definition: SmallVector.h:218
#define DEBUG
Definition: main.h:181
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::data(), SmallVector< numberOfRows >::data(), DEBUG, dgemv_(), logger, SmallVector< numberOfRows >::size(), and WARN.
◆ operator<<()
template<unsigned int numberOfRows, unsigned int numberOfColumns>
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const SmallMatrix< numberOfRows, numberOfColumns > & |
A |
|
) |
| |
Writes nicely formatted entries of the Matrix A to the stream os.
350 for (
unsigned int i = 0;
i < numberOfRows; ++
i)
352 os <<
A.getRow(
i) << std::endl;
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47
References i.