|
numerics
|
Backend dispatch for real-vector ops, and sequential complex-vector ops. More...
#include "core/vector.hpp"#include <cmath>#include "backends/seq/impl.hpp"#include "backends/blas/impl.hpp"#include "backends/omp/impl.hpp"#include "backends/gpu/impl.hpp"Go to the source code of this file.
Namespaces | |
| namespace | num |
Functions | |
| void | num::scale (Vector &v, real alpha, Backend b=default_backend) |
| v *= alpha | |
| void | num::add (const Vector &x, const Vector &y, Vector &z, Backend b=default_backend) |
| z = x + y | |
| void | num::axpy (real alpha, const Vector &x, Vector &y, Backend b=default_backend) |
| y += alpha * x | |
| real | num::dot (const Vector &x, const Vector &y, Backend b=default_backend) |
| dot product | |
| real | num::norm (const Vector &x, Backend b=default_backend) |
| Euclidean norm. | |
| void | num::scale (CVector &v, cplx alpha) |
| v *= alpha | |
| void | num::axpy (cplx alpha, const CVector &x, CVector &y) |
| y += alpha * x | |
| cplx | num::dot (const CVector &x, const CVector &y) |
| Conjugate inner product <x, y> = Sigma conj(x_i) * y_i. | |
| real | num::norm (const CVector &x) |
| Euclidean norm sqrt(Sigma |v_i|^2) | |
Backend dispatch for real-vector ops, and sequential complex-vector ops.
BasicVector<T> member functions are defined inline in vector.hpp (template). This file only provides:
Adding a new backend:
case Backend::<name>: to each switch belowDefinition in file vector.cpp.