72template <
typename T,
size_t SIMD_WIDTH_DEFAULT_NATIVE>
80 static constexpr size_t elements = SIMD_WIDTH /
sizeof(T);
90 static constexpr size_t bytes = SIMD_WIDTH;
116template <
typename T,
size_t SIMD_WIDTH_DEFAULT_NATIVE>
153 explicit SIMD_INLINE
operator uint64_t()
const;
200template <
typename Tout,
typename Tin>
203 return (
sizeof(Tout) <
sizeof(Tin)) ? (
sizeof(Tin) /
sizeof(Tout)) : 1;
215template <
typename Tout,
typename Tin>
218 return (
sizeof(Tout) >
sizeof(Tin)) ? (
sizeof(Tout) /
sizeof(Tin)) : 1;
230template <
typename Tout,
typename Tin,
size_t SIMD_WIDTH>
244constexpr const T &max(
const T &a,
const T &b)
246 return (a < b) ? b : a;
250constexpr const T &min(
const T &a,
const T &b)
252 return (a < b) ? a : b;
265template <
typename Tout,
typename Tin>
267#ifdef SIMD_64BIT_TYPES
268 typename std::conditional<internal::vec::max(
sizeof(Tout),
sizeof(Tin)) <=
SIMD mask class consisting of as many bits as the corresponding Vec has elements.
Definition vec.H:119
bool operator[](const size_t i) const
Returns the Mask bit at the given index.
Mask(const Vec< T, SIMD_WIDTH > &x)
Constructs a Mask from a Vec.
bool operator==(const Mask< T, SIMD_WIDTH > &other) const
Compares the Mask with another Mask.
SIMD vector class, holds multiple elements of the same type.
Definition vec.H:75
static constexpr size_t elems
Number of elements in the vector. Alias for elements.
Definition vec.H:85
static constexpr size_t bytes
Number of bytes in the vector.
Definition vec.H:90
static constexpr size_t elements
Number of elements in the vector.
Definition vec.H:80
Aligned allocator.
Definition alloc.H:132
float Float
Single-precision floating point number (32-bit)
Definition types.H:56
double Double
Double-precision floating point number (64-bit)
Definition types.H:57
typename std::conditional< internal::vec::max(sizeof(Tout), sizeof(Tin))<= sizeof(Float), Float, Double >::type BigEnoughFloat
Smallest floating point type that is at least as big as the input and output types.
Definition vec.H:266
static constexpr size_t numInVecs()
Number of input vectors for functions that potentially change the size of the elements but not the nu...
Definition vec.H:201
static constexpr size_t numOutVecs()
Number of output vectors for functions that potentially change the size of the elements but not the n...
Definition vec.H:216
static constexpr size_t numSIMDVecsElements()
Number of elements in all input vectors for functions that potentially change the size of the element...
Definition vec.H:231
Namespace for T-SIMD.
Definition time_measurement.H:161