10#include "backends/omp/impl.hpp"
11#include "backends/seq/impl.hpp"
102 for (
idx i = 0; i < v.
size(); ++i)
107 for (
idx i = 0; i < x.
size(); ++i)
108 y[i] += alpha * x[i];
113 for (
idx i = 0; i < x.
size(); ++i)
114 sum += std::conj(x[i]) * y[i];
120 for (
idx i = 0; i < x.
size(); ++i)
121 sum += std::norm(x[i]);
122 return std::sqrt(sum);
constexpr idx size() const noexcept
Private declarations for the BLAS backend. Only included by src/core/vector.cpp and src/core/matrix....
Private declarations for the GPU (CUDA) backend. Only included by src/core/vector....
real dot(const Vector &x, const Vector &y)
void axpy(real alpha, const Vector &x, Vector &y)
real norm(const Vector &x)
void scale(Vector &v, real alpha)
void axpy(real alpha, const Vector &x, Vector &y)
real dot(const Vector &x, const Vector &y)
real norm(const Vector &x)
void scale(Vector &v, real alpha)
real dot(const Vector &x, const Vector &y)
void scale(Vector &v, real alpha)
void axpy(real alpha, const Vector &x, Vector &y)
real dot(const Vector &x, const Vector &y)
void scale(Vector &v, real alpha)
real norm(const Vector &x)
void add(const Vector &x, const Vector &y, Vector &z)
void axpy(real alpha, const Vector &x, Vector &y)
void add(const real *x, const real *y, real *z, idx n)
z = x + y
void scale(Vector &v, real alpha, Backend b=default_backend)
Compute .
real dot(const Vector &x, const Vector &y, Backend b=default_backend)
Compute .
real norm(const Vector &x, Backend b=default_backend)
Compute .
std::complex< real > cplx
void axpy(real alpha, const Vector &x, Vector &y, Backend b=default_backend)
Compute .
void add(const Vector &x, const Vector &y, Vector &z, Backend b=default_backend)
Compute .
Dense vector storage and operations.