|
numerics
|
Matrix constructors, GPU lifecycle, and backend dispatch for matrix ops. More...
#include "core/matrix.hpp"#include "core/parallel/cuda_ops.hpp"#include <algorithm>#include "backends/seq/impl.hpp"#include "backends/blas/impl.hpp"#include "backends/omp/impl.hpp"#include "backends/gpu/impl.hpp"#include "backends/simd/impl.hpp"Go to the source code of this file.
Namespaces | |
| namespace | num |
Functions | |
| void | num::matmul (const Matrix &A, const Matrix &B, Matrix &C, Backend b=default_backend) |
| C = A * B. | |
| void | num::matvec (const Matrix &A, const Vector &x, Vector &y, Backend b=default_backend) |
| y = A * x | |
| void | num::matadd (real alpha, const Matrix &A, real beta, const Matrix &B, Matrix &C, Backend b=default_backend) |
| C = alpha*A + beta*B. | |
| void | num::matmul_blocked (const Matrix &A, const Matrix &B, Matrix &C, idx block_size=64) |
| C = A * B (cache-blocked) | |
| void | num::matmul_register_blocked (const Matrix &A, const Matrix &B, Matrix &C, idx block_size=64, idx reg_size=4) |
| C = A * B (register-blocked) | |
| void | num::matmul_simd (const Matrix &A, const Matrix &B, Matrix &C, idx block_size=64) |
| C = A * B (SIMD-accelerated) | |
| void | num::matvec_simd (const Matrix &A, const Vector &x, Vector &y) |
| y = A * x (SIMD-accelerated) | |
Matrix constructors, GPU lifecycle, and backend dispatch for matrix ops.
Adding a new backend:
case Backend::<name>: to each switch belowDefinition in file matrix.cpp.