28 #ifndef VC_COMMON_SIMDARRAYFWD_H_
29 #define VC_COMMON_SIMDARRAYFWD_H_
31 #include "../scalar/types.h"
32 #include "../sse/types.h"
33 #include "../avx/types.h"
34 #include "../mic/types.h"
39 namespace Vc_VERSIONED_NAMESPACE
50 template<std::size_t N,
typename... Typelist>
struct select_best_vector_type_impl;
52 template<std::
size_t N,
typename T>
struct select_best_vector_type_impl<N, T>
56 template<std::size_t N,
typename T,
typename... Typelist>
struct select_best_vector_type_impl<N, T, Typelist...>
58 using type =
typename std::conditional<
59 (N < T::Size),
typename select_best_vector_type_impl<N, Typelist...>::type,
62 template <
typename T, std::
size_t N>
63 using select_best_vector_type =
64 typename select_best_vector_type_impl<N,
69 #elif defined(Vc_IMPL_AVX)
73 #elif defined(Vc_IMPL_Scalar)
75 #elif defined(Vc_IMPL_SSE)
78 #elif defined(Vc_IMPL_MIC)
111 template <
typename T,
size_t N,
typename V = Common::select_best_vector_type<T, N>,
117 template <
typename T,
size_t N,
typename V = Common::select_best_vector_type<T, N>,
127 template <
typename T, std::
size_t N>
struct SimdArrayTraits {
128 static constexpr std::size_t N0 = Common::left_size<N>();
129 static constexpr std::size_t N1 = Common::right_size<N>();
135 template <
typename T, std::
size_t N,
typename VectorType, std::
size_t VectorSize>
138 template <
typename T, std::
size_t N,
typename VectorType, std::
size_t VectorSize>
141 template <
typename T, std::
size_t N,
typename VectorType, std::
size_t VectorSize>
144 template <
typename T, std::
size_t N,
typename VectorType, std::
size_t VectorSize>
148 template <
typename T, std::
size_t N,
typename V>
150 template <
typename T, std::
size_t N,
typename V>
155 template <
typename T, std::
size_t N,
typename V>
struct is_atomic_simdarray_internal<
SimdArray<T, N, V, N>> :
public std::true_type {};
156 template <
typename T, std::
size_t N,
typename V>
struct is_atomic_simd_mask_array_internal<SimdMaskArray<T, N, V, N>> :
public std::true_type {};
158 template <
typename T, std::
size_t N,
typename VectorType, std::
size_t M>
struct is_simdarray_internal<SimdArray<T, N, VectorType, M>> :
public std::true_type {};
159 template <
typename T, std::
size_t N,
typename VectorType, std::
size_t M>
struct is_simd_mask_array_internal<SimdMaskArray<T, N, VectorType, M>> :
public std::true_type {};
160 template <
typename T, std::
size_t N,
typename V, std::
size_t M>
struct is_integral_internal <SimdArray<T, N, V, M>, false> :
public std::is_integral<T> {};
161 template <
typename T, std::
size_t N,
typename V, std::
size_t M>
struct is_floating_point_internal<SimdArray<T, N, V, M>, false> :
public std::is_floating_point<T> {};
162 template <
typename T, std::
size_t N,
typename V, std::
size_t M>
struct is_signed_internal <SimdArray<T, N, V, M>, false> :
public std::is_signed<T> {};
163 template <
typename T, std::
size_t N,
typename V, std::
size_t M>
struct is_unsigned_internal <SimdArray<T, N, V, M>, false> :
public std::is_unsigned<T> {};
165 template<
typename T, std::
size_t N>
struct has_no_allocated_data_impl<
Vc::SimdArray<T, N>> :
public std::true_type {};
170 #endif // VC_COMMON_SIMDARRAYFWD_H_
Data-parallel arithmetic type with user-defined number of elements.
Data-parallel mask type with user-defined number of boolean elements.
Vector Classes Namespace.