Index: libcxx/include/__config =================================================================== --- libcxx/include/__config +++ libcxx/include/__config @@ -604,6 +604,8 @@ #define _LIBCPP_HAS_NO_ASAN +#define _LIBCPP_HAS_NO_VECTOR_EXTENSION + #elif defined(_LIBCPP_COMPILER_IBM) #define _ALIGNAS(x) __attribute__((__aligned__(x))) @@ -634,6 +636,8 @@ #define _LIBCPP_HAS_NO_ASAN +#define _LIBCPP_HAS_NO_VECTOR_EXTENSION + #endif // _LIBCPP_COMPILER_[CLANG|GCC|MSVC|IBM] #if defined(_LIBCPP_OBJECT_FORMAT_COFF) Index: libcxx/include/experimental/__config =================================================================== --- libcxx/include/experimental/__config +++ libcxx/include/experimental/__config @@ -66,4 +66,11 @@ #define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD_ABI \ } _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD +// TODO: support more targets +#if defined(__AVX__) +#define _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES 32 +#else +#define _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES 16 +#endif + #endif Index: libcxx/include/experimental/simd =================================================================== --- libcxx/include/experimental/simd +++ libcxx/include/experimental/simd @@ -651,6 +651,7 @@ */ #include +#include #include #include #include @@ -664,23 +665,235 @@ enum class _StorageKind { _Scalar, _Array, + _VecExt, }; template <_StorageKind __kind, int _Np> struct __simd_abi {}; template -struct __simd_storage_traits {}; +class __simd_storage {}; template -struct __simd_storage_traits<_Tp, - __simd_abi<_StorageKind::_Array, __num_element>> { - using type = std::array<_Tp, __num_element>; +class __simd_storage<_Tp, __simd_abi<_StorageKind::_Array, __num_element>> { + std::array<_Tp, __num_element> __storage_; + + template + friend struct simd; + + template + friend struct simd_mask; + +public: + _Tp __get(size_t __index) const { return __storage_[__index]; }; + void __set(size_t __index, _Tp __val) { __storage_[__index] = __val; } }; template -struct __simd_storage_traits<_Tp, __simd_abi<_StorageKind::_Scalar, 1>> { - using type = _Tp; +class __simd_storage<_Tp, __simd_abi<_StorageKind::_Scalar, 1>> { + _Tp __storage_; + + template + friend struct simd; + + template + friend struct simd_mask; + +public: + _Tp __get(size_t __index) const { return (&__storage_)[__index]; }; + void __set(size_t __index, _Tp __val) { (&__storage_)[__index] = __val; } +}; + +#ifndef _LIBCPP_HAS_NO_VECTOR_EXTENSION + +constexpr size_t __floor_pow_of_2(size_t __val) { + return ((__val - 1) & __val) == 0 ? __val + : __floor_pow_of_2((__val - 1) & __val); +} + +constexpr size_t __ceil_pow_of_2(size_t __val) { + return __val == 1 ? 1 : __floor_pow_of_2(__val - 1) << 1; +} + +template +struct __vec_ext_traits { +#if !defined(_LIBCPP_COMPILER_CLANG) + typedef _Tp type __attribute__((vector_size(__ceil_pow_of_2(__bytes)))); +#endif +}; + +#if defined(_LIBCPP_COMPILER_CLANG) +#define _SPECIALIZE_VEC_EXT(_TYPE, _NUM_ELEMENT) \ + template <> \ + struct __vec_ext_traits<_TYPE, sizeof(_TYPE) * _NUM_ELEMENT> { \ + using type = \ + _TYPE __attribute__((vector_size(sizeof(_TYPE) * _NUM_ELEMENT))); \ + } + +#define _SPECIALIZE_VEC_EXT_32(_TYPE) \ + _SPECIALIZE_VEC_EXT(_TYPE, 1); \ + _SPECIALIZE_VEC_EXT(_TYPE, 2); \ + _SPECIALIZE_VEC_EXT(_TYPE, 3); \ + _SPECIALIZE_VEC_EXT(_TYPE, 4); \ + _SPECIALIZE_VEC_EXT(_TYPE, 5); \ + _SPECIALIZE_VEC_EXT(_TYPE, 6); \ + _SPECIALIZE_VEC_EXT(_TYPE, 7); \ + _SPECIALIZE_VEC_EXT(_TYPE, 8); \ + _SPECIALIZE_VEC_EXT(_TYPE, 9); \ + _SPECIALIZE_VEC_EXT(_TYPE, 10); \ + _SPECIALIZE_VEC_EXT(_TYPE, 11); \ + _SPECIALIZE_VEC_EXT(_TYPE, 12); \ + _SPECIALIZE_VEC_EXT(_TYPE, 13); \ + _SPECIALIZE_VEC_EXT(_TYPE, 14); \ + _SPECIALIZE_VEC_EXT(_TYPE, 15); \ + _SPECIALIZE_VEC_EXT(_TYPE, 16); \ + _SPECIALIZE_VEC_EXT(_TYPE, 17); \ + _SPECIALIZE_VEC_EXT(_TYPE, 18); \ + _SPECIALIZE_VEC_EXT(_TYPE, 19); \ + _SPECIALIZE_VEC_EXT(_TYPE, 20); \ + _SPECIALIZE_VEC_EXT(_TYPE, 21); \ + _SPECIALIZE_VEC_EXT(_TYPE, 22); \ + _SPECIALIZE_VEC_EXT(_TYPE, 23); \ + _SPECIALIZE_VEC_EXT(_TYPE, 24); \ + _SPECIALIZE_VEC_EXT(_TYPE, 25); \ + _SPECIALIZE_VEC_EXT(_TYPE, 26); \ + _SPECIALIZE_VEC_EXT(_TYPE, 27); \ + _SPECIALIZE_VEC_EXT(_TYPE, 28); \ + _SPECIALIZE_VEC_EXT(_TYPE, 29); \ + _SPECIALIZE_VEC_EXT(_TYPE, 30); \ + _SPECIALIZE_VEC_EXT(_TYPE, 31); \ + _SPECIALIZE_VEC_EXT(_TYPE, 32); + +_SPECIALIZE_VEC_EXT_32(char); +_SPECIALIZE_VEC_EXT_32(char16_t); +_SPECIALIZE_VEC_EXT_32(char32_t); +_SPECIALIZE_VEC_EXT_32(wchar_t); +_SPECIALIZE_VEC_EXT_32(signed char); +_SPECIALIZE_VEC_EXT_32(signed short); +_SPECIALIZE_VEC_EXT_32(signed int); +_SPECIALIZE_VEC_EXT_32(signed long); +_SPECIALIZE_VEC_EXT_32(signed long long); +_SPECIALIZE_VEC_EXT_32(unsigned char); +_SPECIALIZE_VEC_EXT_32(unsigned short); +_SPECIALIZE_VEC_EXT_32(unsigned int); +_SPECIALIZE_VEC_EXT_32(unsigned long); +_SPECIALIZE_VEC_EXT_32(unsigned long long); +_SPECIALIZE_VEC_EXT_32(float); +_SPECIALIZE_VEC_EXT_32(double); +_SPECIALIZE_VEC_EXT_32(long double); + +#undef _SPECIALIZE_VEC_EXT_32 +#undef _SPECIALIZE_VEC_EXT +#endif + +template +class __simd_storage<_Tp, __simd_abi<_StorageKind::_VecExt, __num_element>> { + using _StorageType = + typename __vec_ext_traits<_Tp, sizeof(_Tp) * __num_element>::type; + + _StorageType __storage_; + + template + friend struct simd; + + template + friend struct simd_mask; + +public: + _Tp __get(size_t __index) const { return __storage_[__index]; }; + void __set(size_t __index, _Tp __val) { __storage_[__index] = __val; } +}; + +#endif // _LIBCPP_HAS_NO_VECTOR_EXTENSION + +template +class __simd_reference { + static_assert(std::is_same<_Vp, _Tp>::value, ""); + + template + friend struct simd; + + template + friend struct simd_mask; + + __simd_storage<_Tp, _Abi>* __ptr_; + size_t __index_; + + __simd_reference(__simd_storage<_Tp, _Abi>* __ptr, size_t __index) + : __ptr_(__ptr), __index_(__index) {} + + __simd_reference(const __simd_reference&) = default; + +public: + __simd_reference() = delete; + __simd_reference& operator=(const __simd_reference&) = delete; + + operator _Vp() const { return __ptr_->__get(__index_); } + + __simd_reference operator=(_Vp __value) && { + __ptr_->__set(__index_, __value); + return *this; + } + + __simd_reference operator++() && { + return std::move(*this) = __ptr_->__get(__index_) + 1; + } + + _Vp operator++(int) && { + auto __val = __ptr_->__get(__index_); + __ptr_->__set(__index_, __val + 1); + return __val; + } + + __simd_reference operator--() && { + return std::move(*this) = __ptr_->__get(__index_) - 1; + } + + _Vp operator--(int) && { + auto __val = __ptr_->__get(__index_); + __ptr_->__set(__index_, __val - 1); + return __val; + } + + __simd_reference operator+=(_Vp __value) && { + return std::move(*this) = __ptr_->__get(__index_) + __value; + } + + __simd_reference operator-=(_Vp __value) && { + return std::move(*this) = __ptr_->__get(__index_) - __value; + } + + __simd_reference operator*=(_Vp __value) && { + return std::move(*this) = __ptr_->__get(__index_) * __value; + } + + __simd_reference operator/=(_Vp __value) && { + return std::move(*this) = __ptr_->__get(__index_) / __value; + } + + __simd_reference operator%=(_Vp __value) && { + return std::move(*this) = __ptr_->__get(__index_) % __value; + } + + __simd_reference operator>>=(_Vp __value) && { + return std::move(*this) = __ptr_->__get(__index_) >> __value; + } + + __simd_reference operator<<=(_Vp __value) && { + return std::move(*this) = __ptr_->__get(__index_) << __value; + } + + __simd_reference operator&=(_Vp __value) && { + return std::move(*this) = __ptr_->__get(__index_) & __value; + } + + __simd_reference operator|=(_Vp __value) && { + return std::move(*this) = __ptr_->__get(__index_) | __value; + } + + __simd_reference operator^=(_Vp __value) && { + return std::move(*this) = __ptr_->__get(__index_) ^ __value; + } }; template @@ -720,6 +933,17 @@ return static_cast<_Tp>(__first) + __variadic_sum<_Tp>(__rest...); } +template +struct __nodeduce { + using type = _Tp; +}; + +template +constexpr bool __vectorizable() { + return std::is_arithmetic<_Tp>::value && !std::is_const<_Tp>::value && + !std::is_volatile<_Tp>::value && !std::is_same<_Tp, bool>::value; +} + _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD_ABI @@ -728,14 +952,21 @@ template using fixed_size = __simd_abi<_StorageKind::_Array, _Np>; -#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template -_LIBCPP_INLINE_VAR constexpr int max_fixed_size = 32; -#endif +_LIBCPP_INLINE_VAR constexpr size_t max_fixed_size = 32; + template using compatible = fixed_size<16 / sizeof(_Tp)>; + +#ifndef _LIBCPP_HAS_NO_VECTOR_EXTENSION template -using native = compatible<_Tp>; +using native = __simd_abi<_StorageKind::_VecExt, + _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES / sizeof(_Tp)>; +#else +template +using native = + fixed_size<_Tp, _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES / sizeof(_Tp)>; +#endif // _LIBCPP_HAS_NO_VECTOR_EXTENSION _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD_ABI _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD @@ -749,14 +980,10 @@ struct vector_aligned_tag {}; template struct overaligned_tag {}; -#if _LIBCPP_STD_VER > 14 _LIBCPP_INLINE_VAR constexpr element_aligned_tag element_aligned{}; _LIBCPP_INLINE_VAR constexpr vector_aligned_tag vector_aligned{}; -#if !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template _LIBCPP_INLINE_VAR constexpr overaligned_tag<_Np> overaligned{}; -#endif -#endif // traits [simd.traits] template @@ -794,7 +1021,6 @@ struct is_simd_flag_type> : std::integral_constant {}; -#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template _LIBCPP_INLINE_VAR constexpr bool is_abi_tag_v = is_abi_tag<_Tp>::value; template @@ -804,7 +1030,6 @@ template _LIBCPP_INLINE_VAR constexpr bool is_simd_flag_type_v = is_simd_flag_type<_Tp>::value; -#endif template struct abi_for_size { using type = simd_abi::fixed_size<_Np>; @@ -824,17 +1049,16 @@ "Element type should be vectorizable"); }; +// TODO: implement it. template struct memory_alignment; -#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) template > _LIBCPP_INLINE_VAR constexpr size_t simd_size_v = simd_size<_Tp, _Abi>::value; template _LIBCPP_INLINE_VAR constexpr size_t memory_alignment_v = memory_alignment<_Tp, _Up>::value; -#endif // class template simd [simd.class] template @@ -972,11 +1196,6 @@ class where_expression; // masked assignment [simd.mask.where] -template -struct __nodeduce { - using type = _Tp; -}; - template where_expression, simd<_Tp, _Abi>> where(const typename simd<_Tp, _Abi>::mask_type&, simd<_Tp, _Abi>&) noexcept; @@ -1113,7 +1332,23 @@ // TODO: implement simd template class simd { +public: + using value_type = _Tp; + using reference = __simd_reference<_Tp, _Tp, _Abi>; + using mask_type = simd_mask<_Tp, _Abi>; + using abi_type = _Abi; + + simd() = default; + simd(const simd&) = default; + simd& operator=(const simd&) = default; + + static constexpr size_t size() noexcept { + return simd_size<_Tp, _Abi>::value; + } + private: + __simd_storage<_Tp, _Abi> __s_; + template static constexpr bool __can_broadcast() { return (std::is_arithmetic<_Up>::value && @@ -1126,57 +1361,97 @@ std::is_unsigned<_Tp>::value); } -public: - using value_type = _Tp; - // TODO: this is strawman implementation. Turn it into a proxy type. - using reference = _Tp&; - using mask_type = simd_mask<_Tp, _Abi>; - - using abi_type = _Abi; + template + static constexpr decltype( + std::forward_as_tuple(std::declval<_Generator>()( + std::integral_constant())...), + bool()) + __can_generate(std::index_sequence<__indicies...>) { + return !__variadic_sum( + !__can_broadcast()( + std::integral_constant()))>()...); + } - static constexpr size_t size() noexcept { - return simd_size<_Tp, _Abi>::value; + template + static bool __can_generate(...) { + return false; } - simd() = default; + template + void __generator_init(_Generator&& __g, std::index_sequence<__indicies...>) { + int __not_used[]{((*this)[__indicies] = + __g(std::integral_constant()), + 0)...}; + (void)__not_used; + } +public: // implicit type conversion constructor template >::value && __is_non_narrowing_arithmetic_convertible<_Up, _Tp>()>::type> - simd(const simd<_Up, simd_abi::fixed_size>&) {} + simd(const simd<_Up, simd_abi::fixed_size>& __v) { + for (size_t __i = 0; __i < size(); __i++) { + (*this)[__i] = static_cast<_Tp>(__v[__i]); + } + } // implicit broadcast constructor template ()>::type> - simd(_Up&&); + simd(_Up&& __rv) { + auto __v = static_cast<_Tp>(__rv); + for (size_t __i = 0; __i < size(); __i++) { + (*this)[__i] = __v; + } + } // generator constructor - // TODO: for now only check for the index 0. This is because C++11 doesn't - // have index_sequence, and it's hard to check for all indicies without using - // index_sequence. template ()( - std::integral_constant())), - int())()> - explicit simd(_Generator&&); + int = typename std::enable_if< + __can_generate<_Generator>(std::make_index_sequence()), + int>::type()> + explicit simd(_Generator&& __g) { + __generator_init(std::forward<_Generator>(__g), + std::make_index_sequence()); + } // load constructor - template - simd(const _Up*, _Flags); + template < + class _Up, class _Flags, + class = typename std::enable_if<__vectorizable<_Up>()>::type, + class = typename std::enable_if::value>::type> + simd(const _Up* __buffer, _Flags) { + // TODO: optimize for overaligned flags + for (size_t __i = 0; __i < size(); __i++) { + (*this)[__i] = static_cast<_Tp>(__buffer[__i]); + } + } // loads [simd.load] template - void copy_from(const _Up*, _Flags); + typename std::enable_if<__vectorizable<_Up>() && + is_simd_flag_type<_Flags>::value>::type + copy_from(const _Up* __buffer, _Flags) { + *this = simd(__buffer, _Flags()); + } // stores [simd.store] template - void copy_to(_Up*, _Flags) const; + typename std::enable_if<__vectorizable<_Up>() && + is_simd_flag_type<_Flags>::value>::type + copy_to(_Up* __buffer, _Flags) const { + // TODO: optimize for overaligned flags + for (size_t __i = 0; __i < size(); __i++) { + __buffer[__i] = static_cast<_Up>((*this)[__i]); + } + } // scalar access [simd.subscr] - reference operator[](size_t); - value_type operator[](size_t) const; + reference operator[](size_t __i) { return reference(&__s_, __i); } + + value_type operator[](size_t __i) const { return __s_.__get(__i); } // unary operators [simd.unary] simd& operator++(); Index: libcxx/test/std/experimental/simd/simd.abi/vector_extension.pass.cpp =================================================================== --- /dev/null +++ libcxx/test/std/experimental/simd/simd.abi/vector_extension.pass.cpp @@ -0,0 +1,67 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// +// +// [simd.abi] + +#include +#include + +namespace ex = std::experimental::parallelism_v2; + +constexpr inline int reg_width() { +#if defined(__AVX__) + return 32; +#else + return 16; +#endif +} + +#ifndef _LIBCPP_HAS_NO_VECTOR_EXTENSION + +static_assert( + sizeof(ex::simd>) == 1, + ""); +static_assert( + sizeof(ex::simd>) == 2, + ""); +static_assert( + sizeof(ex::simd>) == 4, + ""); +static_assert( + sizeof(ex::simd>) == 16, + ""); +static_assert( + sizeof(ex::simd>) == + 16, + ""); +static_assert( + sizeof(ex::simd>) == + 32, + ""); +static_assert( + std::is_same, + ex::__simd_abi>::value, + ""); +#else +static_assert( + std::is_same, + ex::__simd_abi>::value, + ""); + +#endif + +static_assert(std::is_same, + ex::__simd_abi>::value, + ""); + +int main() {} Index: libcxx/test/std/experimental/simd/simd.access/default.pass.cpp =================================================================== --- /dev/null +++ libcxx/test/std/experimental/simd/simd.access/default.pass.cpp @@ -0,0 +1,217 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// +// +// scalar access [simd.subscr] +// reference operator[](size_t); +// value_type operator[](size_t) const; + +#include +#include +#include + +namespace ex = std::experimental::parallelism_v2; + +template +void test_access() { + { + SimdType a(42), b(4); + static_assert(std::is_convertible::value, ""); + + assert(a[0] == 42); + assert(!a[0] == !42); + assert(~a[0] == ~42); + assert(+a[0] == +42); + assert(-a[0] == -42); + assert(a[0] + b[0] == 42 + 4); + assert(a[0] - b[0] == 42 - 4); + assert(a[0] * b[0] == 42 * 4); + assert(a[0] / b[0] == 42 / 4); + assert(a[0] % b[0] == 42 % 4); + assert(a[0] << b[0] == (42 << 4)); + assert(a[0] >> b[0] == (42 >> 4)); + assert(a[0] < b[0] == false); + assert(a[0] <= b[0] == false); + assert(a[0] > b[0] == true); + assert(a[0] >= b[0] == true); + assert(a[0] == b[0] == false); + assert(a[0] != b[0] == true); + assert((a[0] & b[0]) == (42 & 4)); + assert((a[0] | b[0]) == (42 | 4)); + assert((a[0] ^ b[0]) == (42 ^ 4)); + assert((a[0] && b[0]) == true); + assert((a[0] || b[0]) == true); + + { + auto c = a; + ++c[0]; + assert(c[0] == 42 + 1); + assert(c[1] == 42); + } + { + auto c = a; + auto ret = c[0]++; + assert(ret == 42); + assert(c[0] == 42 + 1); + assert(c[1] == 42); + } + { + auto c = a; + --c[0]; + assert(c[0] == 42 - 1); + assert(c[1] == 42); + } + { + auto c = a; + auto ret = c[0]--; + assert(ret == 42); + assert(c[0] == 42 - 1); + assert(c[1] == 42); + } + + { + auto c = a; + c[0] += b[0]; + assert(c[0] == 42 + 4); + assert(c[1] == 42); + } + { + auto c = a; + c[0] -= b[0]; + assert(c[0] == 42 - 4); + assert(c[1] == 42); + } + { + auto c = a; + c[0] *= b[0]; + assert(c[0] == 42 * 4); + assert(c[1] == 42); + } + { + auto c = a; + c[0] /= b[0]; + assert(c[0] == 42 / 4); + assert(c[1] == 42); + } + { + auto c = a; + c[0] %= b[0]; + assert(c[0] == 42 % 4); + assert(c[1] == 42); + } + { + auto c = a; + c[0] >>= b[0]; + assert(c[0] == (42 >> 4)); + assert(c[1] == 42); + } + { + auto c = a; + c[0] <<= b[0]; + assert(c[0] == (42 << 4)); + assert(c[1] == 42); + } + { + auto c = a; + c[0] &= b[0]; + assert(c[0] == (42 & 4)); + assert(c[1] == 42); + } + { + auto c = a; + c[0] |= b[0]; + assert(c[0] == (42 | 4)); + assert(c[1] == 42); + } + { + auto c = a; + c[0] ^= b[0]; + assert(c[0] == (42 ^ 4)); + assert(c[1] == 42); + } + + { + auto c = a; + (void)(a[0] + (c[0] += a[0])); + } + { + auto c = a; + (void)(a[0] + (c[0] -= a[0])); + } + { + auto c = a; + (void)(a[0] + (c[0] *= a[0])); + } + { + auto c = a; + (void)(a[0] + (c[0] /= a[0])); + } + { + auto c = a; + (void)(a[0] + (c[0] %= a[0])); + } + { + auto c = a; + (void)(a[0] + (c[0] >>= a[0])); + } + { + auto c = a; + (void)(a[0] + (c[0] <<= a[0])); + } + { + auto c = a; + (void)(a[0] + (c[0] &= a[0])); + } + { + auto c = a; + (void)(a[0] + (c[0] |= a[0])); + } + { + auto c = a; + (void)(a[0] + (c[0] ^= a[0])); + } + } + { + const SimdType a(42); + const SimdType b(4); + static_assert(std::is_same::value, ""); + + assert(a[0] == 42); + assert(!a[0] == !42); + assert(~a[0] == ~42); + assert(+a[0] == +42); + assert(-a[0] == -42); + assert(a[0] + b[0] == 42 + 4); + assert(a[0] - b[0] == 42 - 4); + assert(a[0] * b[0] == 42 * 4); + assert(a[0] / b[0] == 42 / 4); + assert(a[0] % b[0] == 42 % 4); + assert(a[0] << b[0] == (42 << 4)); + assert(a[0] >> b[0] == (42 >> 4)); + assert(a[0] < b[0] == false); + assert(a[0] <= b[0] == false); + assert(a[0] > b[0] == true); + assert(a[0] >= b[0] == true); + assert(a[0] == b[0] == false); + assert(a[0] != b[0] == true); + assert((a[0] & b[0]) == (42 & 4)); + assert((a[0] | b[0]) == (42 | 4)); + assert((a[0] ^ b[0]) == (42 ^ 4)); + assert((a[0] && b[0]) == true); + assert((a[0] || b[0]) == true); + } +} + +int main() { + test_access>(); + test_access>(); +} Index: libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp =================================================================== --- libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp +++ libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp @@ -7,34 +7,40 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: c++98, c++03 +// UNSUPPORTED: c++98, c++03, c++11, c++14 // // // [simd.casts] -// template see below simd_cast(const simd&); +// template see below ex::simd_cast<(const +// ex::simd&); + #include #include -using namespace std::experimental::parallelism_v2; - -static_assert(std::is_same(native_simd())), - native_simd>::value, - ""); +namespace ex = std::experimental::parallelism_v2; static_assert( - std::is_same(fixed_size_simd())), - fixed_size_simd>::value, + std::is_same(ex::native_simd())), + ex::native_simd>::value, ""); -static_assert(std::is_same>( - simd())), - fixed_size_simd>::value, +static_assert(std::is_same( + ex::fixed_size_simd())), + ex::fixed_size_simd>::value, ""); -static_assert(std::is_same>( - fixed_size_simd())), - simd>::value, - ""); +static_assert( + std::is_same>( + ex::simd())), + ex::fixed_size_simd>::value, + ""); + +static_assert( + std::is_same< + decltype(ex::simd_cast>( + ex::fixed_size_simd())), + ex::simd>::value, + ""); int main() {} Index: libcxx/test/std/experimental/simd/simd.casts/static_simd_cast.pass.cpp =================================================================== --- libcxx/test/std/experimental/simd/simd.casts/static_simd_cast.pass.cpp +++ libcxx/test/std/experimental/simd/simd.casts/static_simd_cast.pass.cpp @@ -7,32 +7,35 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: c++98, c++03 +// UNSUPPORTED: c++98, c++03, c++11, c++14 // // // [simd.casts] -// template see below static_simd_cast(const simd&); +// template see below ex::static_simd_cast<(const +// ex::simd&); #include #include -using namespace std::experimental::parallelism_v2; +namespace ex = std::experimental::parallelism_v2; static_assert( - std::is_same(native_simd())), - native_simd>::value, + std::is_same(ex::native_simd())), + ex::native_simd>::value, ""); -static_assert(std::is_same>( - simd())), - fixed_size_simd>::value, - ""); +static_assert( + std::is_same>( + ex::simd())), + ex::fixed_size_simd>::value, + ""); static_assert( - std::is_same>( - fixed_size_simd())), - simd>::value, + std::is_same< + decltype(ex::static_simd_cast>( + ex::fixed_size_simd())), + ex::simd>::value, ""); int main() {} Index: libcxx/test/std/experimental/simd/simd.cons/broadcast.pass.cpp =================================================================== --- libcxx/test/std/experimental/simd/simd.cons/broadcast.pass.cpp +++ libcxx/test/std/experimental/simd/simd.cons/broadcast.pass.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: c++98, c++03 +// UNSUPPORTED: c++98, c++03, c++11, c++14 // See GCC PR63723. // UNSUPPORTED: gcc-4.9 @@ -20,18 +20,19 @@ #include #include -using namespace std::experimental::parallelism_v2; +namespace ex = std::experimental::parallelism_v2; template auto not_supported_native_simd_ctor(Args&&... args) - -> decltype(native_simd(std::forward(args)...), void()) = delete; + -> decltype(ex::native_simd(std::forward(args)...), + void()) = delete; template void not_supported_native_simd_ctor(...) {} template auto supported_native_simd_ctor(Args&&... args) - -> decltype(native_simd(std::forward(args)...), void()) {} + -> decltype(ex::native_simd(std::forward(args)...), void()) {} template void supported_native_simd_ctor(...) = delete; @@ -55,4 +56,31 @@ not_supported_native_simd_ctor(3.); } -int main() {} +void compile_convertible() { + struct ConvertibleToInt { + operator int64_t() const; + }; + supported_native_simd_ctor(ConvertibleToInt()); + + struct NotConvertibleToInt {}; + not_supported_native_simd_ctor(NotConvertibleToInt()); +} + +void compile_unsigned() { + not_supported_native_simd_ctor(3u); + supported_native_simd_ctor(3u); +} + +template +void test_broadcast() { + SimdType a(3); + for (size_t i = 0; i < a.size(); i++) { + assert(a[i] == 3); + } +} + +int main() { + test_broadcast>(); + test_broadcast>(); + test_broadcast>(); +} Index: libcxx/test/std/experimental/simd/simd.cons/default.pass.cpp =================================================================== --- /dev/null +++ libcxx/test/std/experimental/simd/simd.cons/default.pass.cpp @@ -0,0 +1,28 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// +// +// [simd.class] +// simd() = default; + +#include +#include + +namespace ex = std::experimental::parallelism_v2; + +int main() { + static_assert(ex::native_simd().size() > 0, ""); + static_assert(ex::fixed_size_simd().size() == 4, ""); + static_assert(ex::fixed_size_simd().size() == 5, ""); + static_assert(ex::fixed_size_simd().size() == 1, ""); + static_assert(ex::fixed_size_simd().size() == 32, ""); +} Index: libcxx/test/std/experimental/simd/simd.cons/generator.pass.cpp =================================================================== --- libcxx/test/std/experimental/simd/simd.cons/generator.pass.cpp +++ libcxx/test/std/experimental/simd/simd.cons/generator.pass.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: c++98, c++03 +// UNSUPPORTED: c++98, c++03, c++11, c++14 // See GCC PR63723. // UNSUPPORTED: gcc-4.9 @@ -17,30 +17,75 @@ // [simd.class] // template explicit simd(G&& gen); -#include #include +#include -using namespace std::experimental::parallelism_v2; +namespace ex = std::experimental::parallelism_v2; template -auto not_supported_native_simd_ctor(Args&&... args) - -> decltype(native_simd(std::forward(args)...), void()) = delete; +auto not_supported_simd128_ctor(Args&&... args) -> decltype( + ex::fixed_size_simd(std::forward(args)...), + void()) = delete; template -void not_supported_native_simd_ctor(...) {} +void not_supported_simd128_ctor(...) {} template -auto supported_native_simd_ctor(Args&&... args) - -> decltype(native_simd(std::forward(args)...), void()) {} +auto supported_simd128_ctor(Args&&... args) -> decltype( + ex::fixed_size_simd(std::forward(args)...), + void()) {} template -void supported_native_simd_ctor(...) = delete; +void supported_simd128_ctor(...) = delete; + +struct identity { + template + int operator()(std::integral_constant) const { + return value; + } +}; void compile_generator() { - supported_native_simd_ctor([](int i) { return i; }); - not_supported_native_simd_ctor([](int i) { return float(i); }); - not_supported_native_simd_ctor([](intptr_t i) { return (int*)(i); }); - not_supported_native_simd_ctor([](int* i) { return i; }); + supported_simd128_ctor(identity()); + not_supported_simd128_ctor([](int i) { return float(i); }); + not_supported_simd128_ctor([](intptr_t i) { return (int*)(i); }); + not_supported_simd128_ctor([](int* i) { return i; }); } -int main() {} +struct limited_identity { + template + typename std::conditional::type + operator()(std::integral_constant) const { + return value; + } +}; + +void compile_limited_identity() { + supported_simd128_ctor(limited_identity()); + not_supported_simd128_ctor(limited_identity()); +} + +template +void test_generator() { + { + SimdType a([](int i) { return i; }); + assert(a[0] == 0); + assert(a[1] == 1); + assert(a[2] == 2); + assert(a[3] == 3); + } + { + SimdType a([](int i) { return 2 * i - 1; }); + assert(a[0] == -1); + assert(a[1] == 1); + assert(a[2] == 3); + assert(a[3] == 5); + } +} + +int main() { + // TODO: adjust the tests when this assertion fails. + assert(ex::native_simd::size() >= 4); + test_generator>(); + test_generator>(); +} Index: libcxx/test/std/experimental/simd/simd.cons/load.pass.cpp =================================================================== --- /dev/null +++ libcxx/test/std/experimental/simd/simd.cons/load.pass.cpp @@ -0,0 +1,118 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// +// +// [simd.class] +// template simd(const U* mem, Flags f); + +#include +#include + +#include "test_macros.h" + +namespace ex = std::experimental::parallelism_v2; + +template +auto not_supported_native_simd_ctor(Args&&... args) + -> decltype(ex::native_simd(std::forward(args)...), + void()) = delete; + +template +void not_supported_native_simd_ctor(...) {} + +template +auto supported_native_simd_ctor(Args&&... args) + -> decltype(ex::native_simd(std::forward(args)...), void()) {} + +template +void supported_native_simd_ctor(...) = delete; + +void compile_load_ctor() { + supported_native_simd_ctor((int*)nullptr, ex::element_aligned_tag()); + supported_native_simd_ctor((int*)nullptr, + ex::element_aligned_tag()); + supported_native_simd_ctor((float*)nullptr, + ex::element_aligned_tag()); + supported_native_simd_ctor((unsigned int*)nullptr, + ex::element_aligned_tag()); + supported_native_simd_ctor((float*)nullptr, + ex::element_aligned_tag()); + + not_supported_native_simd_ctor((int*)nullptr, int()); +} + +template +void test_load_ctor() { + alignas(32) int32_t buffer[] = {4, 3, 2, 1}; + { + SimdType a(buffer, ex::element_aligned_tag()); + assert(a[0] == 4); + assert(a[1] == 3); + assert(a[2] == 2); + assert(a[3] == 1); + } + { + SimdType a(buffer, ex::vector_aligned_tag()); + assert(a[0] == 4); + assert(a[1] == 3); + assert(a[2] == 2); + assert(a[3] == 1); + } + { + SimdType a(buffer, ex::overaligned_tag<32>()); + assert(a[0] == 4); + assert(a[1] == 3); + assert(a[2] == 2); + assert(a[3] == 1); + } + + { + SimdType a(buffer, ex::element_aligned); + assert(a[0] == 4); + assert(a[1] == 3); + assert(a[2] == 2); + assert(a[3] == 1); + } + { + SimdType a(buffer, ex::vector_aligned); + assert(a[0] == 4); + assert(a[1] == 3); + assert(a[2] == 2); + assert(a[3] == 1); + } + { + SimdType a(buffer, ex::overaligned<32>); + assert(a[0] == 4); + assert(a[1] == 3); + assert(a[2] == 2); + assert(a[3] == 1); + } +} + +template +void test_converting_load_ctor() { + float buffer[] = {1., 2., 4., 8.}; + SimdType a(buffer, ex::element_aligned_tag()); + assert(a[0] == 1); + assert(a[1] == 2); + assert(a[2] == 4); + assert(a[3] == 8); +} + +int main() { + // TODO: adjust the tests when this assertion fails. + assert(ex::native_simd::size() >= 4); + test_load_ctor>(); + test_load_ctor>(); + test_converting_load_ctor>(); + test_converting_load_ctor>(); +} Index: libcxx/test/std/experimental/simd/simd.mem/load.pass.cpp =================================================================== --- /dev/null +++ libcxx/test/std/experimental/simd/simd.mem/load.pass.cpp @@ -0,0 +1,122 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// +// +// loads [simd.load] +// template void copy_from(const U* mem, Flags f); + +#include +#include + +#include "test_macros.h" + +namespace ex = std::experimental::parallelism_v2; + +template +auto not_supported_load(Args&&... args) -> decltype( + std::declval>().copy_from(std::forward(args)...), + void()) = delete; + +template +void not_supported_load(...) {} + +template +auto supported_load(Args&&... args) -> decltype( + std::declval>().copy_from(std::forward(args)...), + void()) {} + +template +void supported_load(...) = delete; + +void compile_load() { + supported_load((int*)nullptr, ex::element_aligned_tag()); + supported_load((int*)nullptr, ex::element_aligned_tag()); + supported_load((float*)nullptr, ex::element_aligned_tag()); + supported_load((unsigned int*)nullptr, ex::element_aligned_tag()); + supported_load((float*)nullptr, ex::element_aligned_tag()); + + not_supported_load((int*)nullptr, int()); +} + +template +void test_load() { + alignas(32) int32_t buffer[] = {4, 3, 2, 1}; + { + SimdType a; + a.copy_from(buffer, ex::element_aligned_tag()); + assert(a[0] == 4); + assert(a[1] == 3); + assert(a[2] == 2); + assert(a[3] == 1); + } + { + SimdType a; + a.copy_from(buffer, ex::vector_aligned_tag()); + assert(a[0] == 4); + assert(a[1] == 3); + assert(a[2] == 2); + assert(a[3] == 1); + } + { + SimdType a; + a.copy_from(buffer, ex::overaligned_tag<32>()); + assert(a[0] == 4); + assert(a[1] == 3); + assert(a[2] == 2); + assert(a[3] == 1); + } + + { + SimdType a; + a.copy_from(buffer, ex::element_aligned); + assert(a[0] == 4); + assert(a[1] == 3); + assert(a[2] == 2); + assert(a[3] == 1); + } + { + SimdType a; + a.copy_from(buffer, ex::vector_aligned); + assert(a[0] == 4); + assert(a[1] == 3); + assert(a[2] == 2); + assert(a[3] == 1); + } + { + SimdType a; + a.copy_from(buffer, ex::overaligned<32>); + assert(a[0] == 4); + assert(a[1] == 3); + assert(a[2] == 2); + assert(a[3] == 1); + } +} + +template +void test_converting_load() { + float buffer[] = {1., 2., 4., 8.}; + SimdType a; + a.copy_from(buffer, ex::element_aligned_tag()); + assert(a[0] == 1); + assert(a[1] == 2); + assert(a[2] == 4); + assert(a[3] == 8); +} + +int main() { + // TODO: adjust the tests when this assertion fails. + assert(ex::native_simd::size() >= 4); + test_load>(); + test_load>(); + test_converting_load>(); + test_converting_load>(); +} Index: libcxx/test/std/experimental/simd/simd.mem/store.pass.cpp =================================================================== --- /dev/null +++ libcxx/test/std/experimental/simd/simd.mem/store.pass.cpp @@ -0,0 +1,95 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03, c++11, c++14 + +// +// +// // stores [simd.store] +// template void copy_to(U* mem, Flags f) const; + +#include +#include + +#include "test_macros.h" + +namespace ex = std::experimental::parallelism_v2; + +template +void test_store() { + SimdType a([](int i) { return 4 - i; }); + { + alignas(32) int32_t buffer[4] = {0}; + a.copy_to(buffer, ex::element_aligned_tag()); + assert(buffer[0] == 4); + assert(buffer[1] == 3); + assert(buffer[2] == 2); + assert(buffer[3] == 1); + } + { + alignas(32) int32_t buffer[4] = {0}; + a.copy_to(buffer, ex::vector_aligned_tag()); + assert(buffer[0] == 4); + assert(buffer[1] == 3); + assert(buffer[2] == 2); + assert(buffer[3] == 1); + } + { + alignas(32) int32_t buffer[4] = {0}; + a.copy_to(buffer, ex::overaligned_tag<32>()); + assert(buffer[0] == 4); + assert(buffer[1] == 3); + assert(buffer[2] == 2); + assert(buffer[3] == 1); + } + + { + alignas(32) int32_t buffer[4] = {0}; + a.copy_to(buffer, ex::element_aligned); + assert(buffer[0] == 4); + assert(buffer[1] == 3); + assert(buffer[2] == 2); + assert(buffer[3] == 1); + } + { + alignas(32) int32_t buffer[4] = {0}; + a.copy_to(buffer, ex::vector_aligned); + assert(buffer[0] == 4); + assert(buffer[1] == 3); + assert(buffer[2] == 2); + assert(buffer[3] == 1); + } + { + alignas(32) int32_t buffer[4] = {0}; + a.copy_to(buffer, ex::overaligned<32>); + assert(buffer[0] == 4); + assert(buffer[1] == 3); + assert(buffer[2] == 2); + assert(buffer[3] == 1); + } +} + +template +void test_converting_store() { + float buffer[4] = {0.}; + SimdType a([](int i) { return 1 << i; }); + a.copy_to(buffer, ex::element_aligned_tag()); + assert(buffer[0] == 1.); + assert(buffer[1] == 2.); + assert(buffer[2] == 4.); + assert(buffer[3] == 8.); +} + +int main() { + // TODO: adjust the tests when this assertion fails. + test_store>(); + test_store>(); + test_converting_store>(); + test_converting_store>(); +} Index: libcxx/test/std/experimental/simd/simd.traits/abi_for_size.pass.cpp =================================================================== --- libcxx/test/std/experimental/simd/simd.traits/abi_for_size.pass.cpp +++ libcxx/test/std/experimental/simd/simd.traits/abi_for_size.pass.cpp @@ -7,24 +7,26 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: c++98, c++03 +// UNSUPPORTED: c++98, c++03, c++11, c++14 // // // [simd.traits] -// template struct abi_for_size { using type = see below ; }; -// template using abi_for_size_t = typename abi_for_size::type; +// template struct abi_for_size { using type = see below ; +// }; template using ex::abi_for_size_t = typename +// ex::abi_for_size::type; #include #include -using namespace std::experimental::parallelism_v2; +namespace ex = std::experimental::parallelism_v2; -static_assert(std::is_same::type, - simd_abi::fixed_size<4>>::value, +static_assert(std::is_same::type, + ex::simd_abi::fixed_size<4>>::value, ""); -static_assert( - std::is_same, simd_abi::fixed_size<4>>::value, ""); +static_assert(std::is_same, + ex::simd_abi::fixed_size<4>>::value, + ""); int main() {} Index: libcxx/test/std/experimental/simd/simd.traits/is_abi_tag.pass.cpp =================================================================== --- libcxx/test/std/experimental/simd/simd.traits/is_abi_tag.pass.cpp +++ libcxx/test/std/experimental/simd/simd.traits/is_abi_tag.pass.cpp @@ -7,109 +7,107 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: c++98, c++03 +// UNSUPPORTED: c++98, c++03, c++11, c++14 // // // [simd.traits] // template struct is_abi_tag; -// template inline constexpr bool is_abi_tag_v = is_abi_tag::value; +// template inline constexpr bool ex::is_abi_tag_v = +// ex::is_abi_tag::value; #include #include #include "test_macros.h" -using namespace std::experimental::parallelism_v2; +namespace ex = std::experimental::parallelism_v2; struct UserType {}; -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); - -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); - -static_assert( is_abi_tag::value, ""); -static_assert(!std::is_same>::value, - ""); - -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); -static_assert( is_abi_tag>::value, ""); - -static_assert(!is_abi_tag::value, ""); -static_assert(!is_abi_tag::value, ""); -static_assert(!is_abi_tag::value, ""); -static_assert(!is_abi_tag::value, ""); -static_assert(!is_abi_tag>::value, ""); -static_assert(!is_abi_tag>::value, ""); -static_assert(!is_abi_tag>::value, ""); -static_assert(!is_abi_tag>::value, ""); - -#if TEST_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) && \ - !defined(_LIBCPP_HAS_NO_INLINE_VARIABLES) - -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); - -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); - -static_assert( is_abi_tag_v, ""); -static_assert(!std::is_same>::value, - ""); - -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); -static_assert( is_abi_tag_v>, ""); - -static_assert(!is_abi_tag_v, ""); -static_assert(!is_abi_tag_v, ""); -static_assert(!is_abi_tag_v, ""); -static_assert(!is_abi_tag_v, ""); -static_assert(!is_abi_tag_v>, ""); -static_assert(!is_abi_tag_v>, ""); -static_assert(!is_abi_tag_v>, ""); -static_assert(!is_abi_tag_v>, ""); - -#endif +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); + +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); + +static_assert(ex::is_abi_tag::value, ""); +static_assert( + !std::is_same>::value, + ""); + +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); +static_assert(ex::is_abi_tag>::value, ""); + +static_assert(!ex::is_abi_tag::value, ""); +static_assert(!ex::is_abi_tag::value, ""); +static_assert(!ex::is_abi_tag::value, ""); +static_assert(!ex::is_abi_tag::value, ""); +static_assert(!ex::is_abi_tag>::value, ""); +static_assert(!ex::is_abi_tag>::value, ""); +static_assert(!ex::is_abi_tag>::value, ""); +static_assert(!ex::is_abi_tag>::value, ""); + +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); + +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); + +static_assert(ex::is_abi_tag_v, ""); +static_assert( + !std::is_same>::value, + ""); + +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); +static_assert(ex::is_abi_tag_v>, ""); + +static_assert(!ex::is_abi_tag_v, ""); +static_assert(!ex::is_abi_tag_v, ""); +static_assert(!ex::is_abi_tag_v, ""); +static_assert(!ex::is_abi_tag_v, ""); +static_assert(!ex::is_abi_tag_v>, ""); +static_assert(!ex::is_abi_tag_v>, ""); +static_assert(!ex::is_abi_tag_v>, ""); +static_assert(!ex::is_abi_tag_v>, ""); int main() {} Index: libcxx/test/std/experimental/simd/simd.traits/is_simd.pass.cpp =================================================================== --- libcxx/test/std/experimental/simd/simd.traits/is_simd.pass.cpp +++ libcxx/test/std/experimental/simd/simd.traits/is_simd.pass.cpp @@ -7,127 +7,123 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: c++98, c++03 +// UNSUPPORTED: c++98, c++03, c++11, c++14 // // // [simd.traits] -// template struct is_simd; -// template inline constexpr bool is_simd_v = is_simd::value; +// template struct ex::is_simd; +// template inline constexpr bool ex::is_simd_v = +// ex::is_simd::value; #include #include #include "test_macros.h" -using namespace std::experimental::parallelism_v2; +namespace ex = std::experimental::parallelism_v2; struct UserType {}; -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); - -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); - -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); - -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); -static_assert( is_simd>::value, ""); - -static_assert(!is_simd::value, ""); -static_assert(!is_simd::value, ""); -static_assert(!is_simd::value, ""); -static_assert(!is_simd>::value, ""); -static_assert(!is_simd>::value, ""); -static_assert(!is_simd::value, ""); - -#if TEST_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) && \ - !defined(_LIBCPP_HAS_NO_INLINE_VARIABLES) - -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); - -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); - -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); - -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); -static_assert( is_simd_v>, ""); - -static_assert(!is_simd_v, ""); -static_assert(!is_simd_v, ""); -static_assert(!is_simd_v, ""); -static_assert(!is_simd_v>, ""); -static_assert(!is_simd_v>, ""); -static_assert(!is_simd_v, ""); - -#endif +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); + +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); + +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); + +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); +static_assert(ex::is_simd>::value, ""); + +static_assert(!ex::is_simd::value, ""); +static_assert(!ex::is_simd::value, ""); +static_assert(!ex::is_simd::value, ""); +static_assert(!ex::is_simd>::value, ""); +static_assert(!ex::is_simd>::value, ""); +static_assert(!ex::is_simd::value, ""); + +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); + +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); + +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); + +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); +static_assert(ex::is_simd_v>, ""); + +static_assert(!ex::is_simd_v, ""); +static_assert(!ex::is_simd_v, ""); +static_assert(!ex::is_simd_v, ""); +static_assert(!ex::is_simd_v>, ""); +static_assert(!ex::is_simd_v>, ""); +static_assert(!ex::is_simd_v, ""); int main() {} Index: libcxx/test/std/experimental/simd/simd.traits/is_simd_flag_type.pass.cpp =================================================================== --- libcxx/test/std/experimental/simd/simd.traits/is_simd_flag_type.pass.cpp +++ libcxx/test/std/experimental/simd/simd.traits/is_simd_flag_type.pass.cpp @@ -7,49 +7,45 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: c++98, c++03 +// UNSUPPORTED: c++98, c++03, c++11, c++14 // // // [simd.traits] // template struct is_simd_flag_type; -// template inline constexpr bool is_simd_flag_type_v = is_simd_flag_type::value; +// template inline constexpr bool ex::is_simd_flag_type_v = +// ex::is_simd_flag_type::value; #include #include #include "test_macros.h" -using namespace std::experimental::parallelism_v2; +namespace ex = std::experimental::parallelism_v2; struct UserType {}; -static_assert( is_simd_flag_type::value, ""); -static_assert( is_simd_flag_type::value, ""); -static_assert( is_simd_flag_type>::value, ""); -static_assert( is_simd_flag_type>::value, ""); - -static_assert(!is_simd_flag_type::value, ""); -static_assert(!is_simd_flag_type::value, ""); -static_assert(!is_simd_flag_type::value, ""); -static_assert(!is_simd_flag_type::value, ""); -static_assert(!is_simd_flag_type>::value, ""); -static_assert(!is_simd_flag_type>::value, ""); - -#if TEST_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) && \ - !defined(_LIBCPP_HAS_NO_INLINE_VARIABLES) - -static_assert( is_simd_flag_type_v, ""); -static_assert( is_simd_flag_type_v, ""); -static_assert( is_simd_flag_type_v>, ""); -static_assert( is_simd_flag_type_v>, ""); - -static_assert(!is_simd_flag_type_v, ""); -static_assert(!is_simd_flag_type_v, ""); -static_assert(!is_simd_flag_type_v, ""); -static_assert(!is_simd_flag_type_v, ""); -static_assert(!is_simd_flag_type_v>, ""); -static_assert(!is_simd_flag_type_v>, ""); - -#endif +static_assert(ex::is_simd_flag_type::value, ""); +static_assert(ex::is_simd_flag_type::value, ""); +static_assert(ex::is_simd_flag_type>::value, ""); +static_assert(ex::is_simd_flag_type>::value, ""); + +static_assert(!ex::is_simd_flag_type::value, ""); +static_assert(!ex::is_simd_flag_type::value, ""); +static_assert(!ex::is_simd_flag_type::value, ""); +static_assert(!ex::is_simd_flag_type::value, ""); +static_assert(!ex::is_simd_flag_type>::value, ""); +static_assert(!ex::is_simd_flag_type>::value, ""); + +static_assert(ex::is_simd_flag_type_v, ""); +static_assert(ex::is_simd_flag_type_v, ""); +static_assert(ex::is_simd_flag_type_v>, ""); +static_assert(ex::is_simd_flag_type_v>, ""); + +static_assert(!ex::is_simd_flag_type_v, ""); +static_assert(!ex::is_simd_flag_type_v, ""); +static_assert(!ex::is_simd_flag_type_v, ""); +static_assert(!ex::is_simd_flag_type_v, ""); +static_assert(!ex::is_simd_flag_type_v>, ""); +static_assert(!ex::is_simd_flag_type_v>, ""); int main() {} Index: libcxx/test/std/experimental/simd/simd.traits/is_simd_mask.pass.cpp =================================================================== --- libcxx/test/std/experimental/simd/simd.traits/is_simd_mask.pass.cpp +++ libcxx/test/std/experimental/simd/simd.traits/is_simd_mask.pass.cpp @@ -7,127 +7,146 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: c++98, c++03 +// UNSUPPORTED: c++98, c++03, c++11, c++14 // // // [simd.traits] -// template struct is_simd_mask; -// template inline constexpr bool is_simd_mask_v = is_simd_mask::value; +// template struct ex::is_simd_mask; +// template inline constexpr bool ex::is_simd_mask_v = +// ex::is_simd_mask::value; #include #include #include "test_macros.h" -using namespace std::experimental::parallelism_v2; +namespace ex = std::experimental::parallelism_v2; struct UserType {}; -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); - -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); - -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); - -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); -static_assert( is_simd_mask>::value, ""); - -static_assert(!is_simd_mask::value, ""); -static_assert(!is_simd_mask::value, ""); -static_assert(!is_simd_mask::value, ""); -static_assert(!is_simd_mask>::value, ""); -static_assert(!is_simd_mask>::value, ""); -static_assert(!is_simd_mask::value, ""); - -#if TEST_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) && \ - !defined(_LIBCPP_HAS_NO_INLINE_VARIABLES) - -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); - -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); - -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); - -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); -static_assert( is_simd_mask_v>, ""); - -static_assert(!is_simd_mask_v, ""); -static_assert(!is_simd_mask_v, ""); -static_assert(!is_simd_mask_v, ""); -static_assert(!is_simd_mask_v>, ""); -static_assert(!is_simd_mask_v>, ""); -static_assert(!is_simd_mask_v, ""); - -#endif +static_assert(ex::is_simd_mask>::value, ""); +static_assert(ex::is_simd_mask>::value, ""); +static_assert(ex::is_simd_mask>::value, ""); +static_assert(ex::is_simd_mask>::value, ""); +static_assert(ex::is_simd_mask>::value, ""); +static_assert(ex::is_simd_mask>::value, ""); +static_assert(ex::is_simd_mask>::value, ""); +static_assert(ex::is_simd_mask>::value, ""); +static_assert(ex::is_simd_mask>::value, ""); +static_assert(ex::is_simd_mask>::value, ""); + +static_assert(ex::is_simd_mask>::value, ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, ""); +static_assert(ex::is_simd_mask>::value, ""); + +static_assert(ex::is_simd_mask>::value, ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, ""); +static_assert(ex::is_simd_mask>::value, ""); + +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, + ""); +static_assert(ex::is_simd_mask>::value, ""); +static_assert(ex::is_simd_mask>::value, + ""); + +static_assert(!ex::is_simd_mask::value, ""); +static_assert(!ex::is_simd_mask::value, ""); +static_assert(!ex::is_simd_mask::value, ""); +static_assert(!ex::is_simd_mask>::value, ""); +static_assert(!ex::is_simd_mask>::value, ""); +static_assert(!ex::is_simd_mask::value, ""); + +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); + +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); + +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); + +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); +static_assert(ex::is_simd_mask_v>, ""); + +static_assert(!ex::is_simd_mask_v, ""); +static_assert(!ex::is_simd_mask_v, ""); +static_assert(!ex::is_simd_mask_v, ""); +static_assert(!ex::is_simd_mask_v>, ""); +static_assert(!ex::is_simd_mask_v>, ""); +static_assert(!ex::is_simd_mask_v, ""); int main() {}