vir-simd 0.4.189
Parallelism TS 2 extensions and simd fallback implementation
Loading...
Searching...
No Matches
vir::execution Namespace Reference

Classes

struct  simd_policy
 Type of the vir::execution::simd execution policy. More...
 

Variables

constexpr simd_policy simd {}
 SIMD execution policy.
 

Detailed Description

Equivalent to the std::execution namespace.

Variable Documentation

◆ simd

simd_policy vir::execution::simd {}
inlineconstexpr

SIMD execution policy.

When this execution policy is used in an algorithm, callables passed to the algorithm are invoked with multiple elements from the input range(s) packed into one or more simd arguments.

Examples:

vir::transform(vir::execution::simd.prefer_aligned(), input_rg, output_rg,
[](auto v) {
return v + v;
});
vir::for_each(vir::execution::simd.unroll_by<3>(), rg, [](auto& v) { v += v; });
constexpr void for_each(ExecutionPolicy pol, It first, It last, F &&fun)
Iterate over the given range (iterator overload).
Definition simd_execution.h:1119
constexpr OutIt transform(ExecutionPolicy pol, It1 first1, It1 last1, OutIt d_first, UnaryOperation unary_op)
Unary transform (iterator overload)
Definition simd_execution.h:1222
constexpr simd_policy simd
SIMD execution policy.
Definition simd_execution.h:528