|
numerics 0.1.0
|
Backend dispatch for real-vector ops and sequential complex-vector ops. More...
#include "core/vector.hpp"#include <cmath>#include "backends/blas/impl.hpp"#include "backends/gpu/impl.hpp"#include "backends/omp/impl.hpp"#include "backends/seq/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) |
| Compute \(v \leftarrow \alpha v\). | |
| void | num::add (const Vector &x, const Vector &y, Vector &z, Backend b=default_backend) |
| Compute \(z=x+y\). | |
| void | num::axpy (real alpha, const Vector &x, Vector &y, Backend b=default_backend) |
| Compute \(y \leftarrow y+\alpha x\). | |
| real | num::dot (const Vector &x, const Vector &y, Backend b=default_backend) |
| Compute \(x^T y\). | |
| real | num::norm (const Vector &x, Backend b=default_backend) |
| Compute \(\|x\|_2\). | |
| 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.
Definition in file vector.cpp.