20 #ifndef VC_COMMON_VECTORTUPLE_H
21 #define VC_COMMON_VECTORTUPLE_H
31 template<
size_t StructSize,
typename V>
struct InterleavedMemoryReadAccess;
36 typedef typename V::EntryType
T;
55 template<
size_t StructSize>
58 VC_STATIC_ASSERT(2 <= StructSize, You_are_trying_to_extract_more_data_from_the_struct_than_it_has);
65 typedef typename V::EntryType
T;
80 #define _VC_VECTORTUPLE_SPECIALIZATION(LENGTH, parameters) \
81 template<typename V> struct VectorTuple<LENGTH, V> \
83 typedef typename V::EntryType T; \
84 typedef V &VC_RESTRICT Reference; \
85 const VectorTuple<LENGTH - 1, V> &l; \
88 Vc_ALWAYS_INLINE VectorTuple(const VectorTuple<LENGTH - 1, V> &tuple, Reference a) \
93 Vc_ALWAYS_INLINE VectorTuple<LENGTH + 1, V> operator,(V &a) const \
95 return VectorTuple<LENGTH + 1, V>(*this, a); \
98 template<size_t StructSize> \
99 Vc_ALWAYS_INLINE void operator=(const InterleavedMemoryReadAccess<StructSize, V> &access) const \
101 VC_STATIC_ASSERT(LENGTH <= StructSize, You_are_trying_to_extract_more_data_from_the_struct_than_it_has); \
102 access.deinterleave parameters; \
105 template<typename V> struct VectorTuple<LENGTH, const V> \
107 typedef typename V::EntryType T; \
108 typedef const V &VC_RESTRICT Reference; \
109 const VectorTuple<LENGTH - 1, const V> &l; \
112 Vc_ALWAYS_INLINE VectorTuple(const VectorTuple<LENGTH - 1, const V> &tuple, Reference a) \
117 Vc_ALWAYS_INLINE VectorTuple<LENGTH + 1, const V> operator,(const V &a) const \
119 return VectorTuple<LENGTH + 1, const V>(*this, a); \
132 #ifdef VC_IMPL_Scalar
134 #elif defined VC_IMPL_SSE
136 #elif defined VC_IMPL_AVX
142 Vc_ALWAYS_INLINE Common::VectorTuple<2, Vc::Vector<T> > operator,(Vc::Vector<T> &
a, Vc::Vector<T> &b)
144 return Common::VectorTuple<2, Vc::Vector<T> >(
a, b);
148 Vc_ALWAYS_INLINE Common::VectorTuple<2, const Vc::Vector<T> > operator,(
const Vc::Vector<T> &
a,
const Vc::Vector<T> &b)
150 return Common::VectorTuple<2, const Vc::Vector<T> >(
a, b);
160 #endif // VC_COMMON_VECTORTUPLE_H
Vc_ALWAYS_INLINE VectorTuple< 3, const V > operator,(const V &a) const
Vc_ALWAYS_INLINE VectorTuple(Reference a, Reference b)
Vc_ALWAYS_INLINE VectorTuple(Reference a, Reference b)
Namespace for new ROOT classes and functions.
Vc_ALWAYS_INLINE VectorTuple< 3, V > operator,(V &a) const
Vc_ALWAYS_INLINE void operator=(const InterleavedMemoryReadAccess< StructSize, V > &access) const
_VC_VECTORTUPLE_SPECIALIZATION(3,(l.l, l.r, r))
Vc_ALWAYS_INLINE VectorTuple< 3, const V > operator,(const V &a) const
const V &VC_RESTRICT Reference
#define VC_STATIC_ASSERT(cond, msg)
void deinterleave(V &v0, V &v1) const