Vc  1.1.0
SIMD Vector Classes for C++
SIMD Array

Detailed Description

This set of (template) classes provides types that allow an arbitrarily sized set of values of an arithmetic type, much like a std::array. But in contrast to std::array the types behave like the SIMD vector types, implementing all needed operators and functions.

Classes

class  SimdArray< T, N, VectorType, size_t >
 Data-parallel type with (somewhat) arbitrary number of components. More...
 
template<size_t A, size_t B, size_t N>
using selectorType = std::integral_constant< bool,((A &(1<< B))!=0)>
 true-/false_type that selects whether the argument with index B should be unpacked
 
template<typename Op , typename Arg >
decltype(actual_value(std::declval< Op & >(), std::declval< Arg >())) conditionalUnpack (std::true_type, Op op, Arg &&arg)
 transforms arg via actual_value
 
template<size_t I, typename Op , typename R , typename... Args, size_t... Indexes>
decltype(std::declval< Op & >()(std::declval< R & >(), conditionalUnpack(selectorType< I, Indexes, icc_sizeof_workaround< Args... >()>(), std::declval< Op & >(), std::declval< Args >())...)) unpackArgumentsAutoImpl (int, index_sequence< Indexes... >, Op op, R &&r, Args &&...args)
 ends the recursion, transforms arguments, and calls op
 
template<typename Op , typename Arg >
Arg conditionalUnpack (std::false_type, Op, Arg &&arg)
 forwards arg to its return value
 
template<size_t I, typename Op , typename R , typename... Args, size_t... Indexes>
void unpackArgumentsAutoImpl (float, index_sequence< Indexes... > is, Op op, R &&r, Args &&...args)
 the current actual_value calls don't work: recurse to I + 1
 
template<typename Op , typename R , typename... Args>
void unpackArgumentsAuto (Op op, R &&r, Args &&...args)
 The interface to start the machinery.