Intel xvec
Experimental C++ simd class library
Loading...
Searching...
No Matches
Chunked invocation

Invoke a callable on corresponding chunks of vectors or masks. More...

Functions

template<simd_size_type _SuggestedN = 0, typename _Fn, vec_or_mask_type _Arg0, vec_or_mask_type... _Args>
constexpr auto xvec::simd::chunked_invoke (_Fn fn, const _Arg0 &arg0, const _Args &... args)
 Invoke a callable on corresponding vector or mask chunks.

Detailed Description

Invoke a callable on corresponding chunks of vectors or masks.

Proposed in P2929, "chunked_invoke", previously named simd_invoke.

See also
https://wg21.link/P2929

Function Documentation

◆ chunked_invoke()

template<simd_size_type _SuggestedN = 0, typename _Fn, vec_or_mask_type _Arg0, vec_or_mask_type... _Args>
auto xvec::simd::chunked_invoke ( _Fn fn,
const _Arg0 & arg0,
const _Args &... args )
constexpr

Invoke a callable on corresponding vector or mask chunks.

Template Parameters
_SuggestedNChunk size, or zero to deduce a common native width.
_FnThe callable type.
_Arg0The first vector or mask argument type.
_ArgsThe remaining vector or mask argument types.
Parameters
fnThe callable invoked on each set of corresponding chunks.
arg0The first vector or mask argument.
argsThe remaining vector or mask arguments.
Returns
Concatenated vector or mask results, or void for a void-returning callable.

All arguments must have equal element counts. The final chunk may be smaller than the selected chunk size. The callable may accept a trailing argument giving the beginning index of the chunk.