Warning, file /include/Vc/avx/types.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 #ifndef VC_AVX_TYPES_H_
0029 #define VC_AVX_TYPES_H_
0030
0031 #include "../sse/types.h"
0032 #include "../traits/type_traits.h"
0033 #include "macros.h"
0034
0035 #ifdef Vc_DEFAULT_IMPL_AVX2
0036 #define Vc_DOUBLE_V_SIZE 4
0037 #define Vc_FLOAT_V_SIZE 8
0038 #define Vc_INT_V_SIZE 8
0039 #define Vc_UINT_V_SIZE 8
0040 #define Vc_SHORT_V_SIZE 16
0041 #define Vc_USHORT_V_SIZE 16
0042 #elif defined Vc_DEFAULT_IMPL_AVX
0043 #define Vc_DOUBLE_V_SIZE 4
0044 #define Vc_FLOAT_V_SIZE 8
0045 #define Vc_INT_V_SIZE 4
0046 #define Vc_UINT_V_SIZE 4
0047 #define Vc_SHORT_V_SIZE 8
0048 #define Vc_USHORT_V_SIZE 8
0049 #endif
0050
0051 namespace Vc_VERSIONED_NAMESPACE
0052 {
0053 namespace AVX
0054 {
0055 template <typename T> using Vector = Vc::Vector<T, VectorAbi::Avx1Abi<T>>;
0056 typedef Vector<double> double_v;
0057 typedef Vector<float> float_v;
0058 typedef Vector<int> int_v;
0059 typedef Vector<unsigned int> uint_v;
0060 typedef Vector<short> short_v;
0061 typedef Vector<unsigned short> ushort_v;
0062
0063 template <typename T> using Mask = Vc::Mask<T, VectorAbi::Avx1Abi<T>>;
0064 typedef Mask<double> double_m;
0065 typedef Mask<float> float_m;
0066 typedef Mask<int> int_m;
0067 typedef Mask<unsigned int> uint_m;
0068 typedef Mask<short> short_m;
0069 typedef Mask<unsigned short> ushort_m;
0070
0071 template <typename T> struct Const;
0072
0073 template <typename T> struct is_vector : public std::false_type {};
0074 template <typename T> struct is_vector<Vector<T>> : public std::true_type {};
0075 template <typename T> struct is_mask : public std::false_type {};
0076 template <typename T> struct is_mask<Mask<T>> : public std::true_type {};
0077 }
0078
0079 namespace AVX2
0080 {
0081 template <typename T> using Vector = Vc::Vector<T, VectorAbi::Avx>;
0082 using double_v = Vector<double>;
0083 using float_v = Vector< float>;
0084 using int_v = Vector< int>;
0085 using uint_v = Vector< uint>;
0086 using short_v = Vector< short>;
0087 using ushort_v = Vector<ushort>;
0088
0089 template <typename T> using Mask = Vc::Mask<T, VectorAbi::Avx>;
0090 using double_m = Mask<double>;
0091 using float_m = Mask< float>;
0092 using llong_m = Mask< llong>;
0093 using ullong_m = Mask<ullong>;
0094 using long_m = Mask< long>;
0095 using ulong_m = Mask< ulong>;
0096 using int_m = Mask< int>;
0097 using uint_m = Mask< uint>;
0098 using short_m = Mask< short>;
0099 using ushort_m = Mask<ushort>;
0100 using schar_m = Mask< schar>;
0101 using uchar_m = Mask< uchar>;
0102
0103 template <typename T> struct is_vector : public std::false_type {};
0104 template <typename T> struct is_vector<Vector<T>> : public std::true_type {};
0105 template <typename T> struct is_mask : public std::false_type {};
0106 template <typename T> struct is_mask<Mask<T>> : public std::true_type {};
0107 }
0108
0109 namespace Traits
0110 {
0111 template <class T> struct
0112 is_simd_vector_internal<Vector<T, VectorAbi::Avx>>
0113 : public is_valid_vector_argument<T> {};
0114
0115 template<typename T> struct is_simd_mask_internal<Mask<T, VectorAbi::Avx>>
0116 : public std::true_type {};
0117 }
0118 }
0119
0120 #endif