32template<
typename T,
typename F>
36 for (
idx i = 0; i < n; ++i) {
42template<
typename T,
typename F>
45 for (
idx i = 0; i < n; ++i) {
51template<
typename T,
typename F>
53 const T* d = x.
data();
56 for (
idx i = 0; i < n; ++i) {
constexpr idx size() const noexcept
Compile-time dispatch policy tags for the kernel module.
void zip_map(const BasicVector< T > &x, const BasicVector< T > &y, BasicVector< T > &z, F &&f)
Fused binary map: z[i] = f(x[i], y[i])
T reduce(const BasicVector< T > &x, T init, F &&f)
Single-pass left fold: f(f(f(init, x[0]), x[1]), ..., x[n-1])
void axpby(real a, const Vector &x, real b, Vector &y, seq_t) noexcept
Sequential: y[i] = a*x[i] + b*y[i] (single-pass; calls raw::axpby)
void map(BasicVector< T > &x, F &&f)
In-place elementwise map: x[i] = f(x[i])
void axpbyz(real a, const Vector &x, real b, const Vector &y, Vector &z, seq_t) noexcept
Sequential: z[i] = a*x[i] + b*y[i].
Parallel execution policy tag.
Sequential execution policy tag.
Dense vector storage and operations.