File indexing completed on 2025-07-12 08:52:40
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 #include "../common/types.h"
0029 #include "../common/vectorabi.h"
0030
0031 #ifndef VC_SCALAR_TYPES_H_
0032 #define VC_SCALAR_TYPES_H_
0033
0034 #ifdef Vc_DEFAULT_IMPL_Scalar
0035 #define Vc_DOUBLE_V_SIZE 1
0036 #define Vc_FLOAT_V_SIZE 1
0037 #define Vc_INT_V_SIZE 1
0038 #define Vc_UINT_V_SIZE 1
0039 #define Vc_SHORT_V_SIZE 1
0040 #define Vc_USHORT_V_SIZE 1
0041 #endif
0042
0043 namespace Vc_VERSIONED_NAMESPACE
0044 {
0045 namespace Scalar
0046 {
0047 template <typename T> using Vector = Vc::Vector<T, VectorAbi::Scalar>;
0048 typedef Vector<double> double_v;
0049 typedef Vector<float> float_v;
0050 typedef Vector<int> int_v;
0051 typedef Vector<unsigned int> uint_v;
0052 typedef Vector<short> short_v;
0053 typedef Vector<unsigned short> ushort_v;
0054
0055 template <typename T> using Mask = Vc::Mask<T, VectorAbi::Scalar>;
0056 typedef Mask<double> double_m;
0057 typedef Mask<float> float_m;
0058 typedef Mask<int> int_m;
0059 typedef Mask<unsigned int> uint_m;
0060 typedef Mask<short> short_m;
0061 typedef Mask<unsigned short> ushort_m;
0062
0063 template <typename T> struct is_vector : public std::false_type {};
0064 template <typename T> struct is_vector<Vector<T>> : public std::true_type {};
0065 template <typename T> struct is_mask : public std::false_type {};
0066 template <typename T> struct is_mask<Mask<T>> : public std::true_type {};
0067 }
0068
0069 namespace Traits
0070 {
0071 template <typename T> struct is_simd_mask_internal<Scalar::Mask<T>>
0072 : public std::true_type {};
0073
0074 template <class T> struct
0075 is_simd_vector_internal<Vector<T, VectorAbi::Scalar>>
0076 : public is_valid_vector_argument<T> {};
0077 }
0078 }
0079
0080 #endif