From 8cace3f05003c6cb4d38c36890055f03151c2ad4 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Fri, 16 Oct 2026 02:39:56 +0800 Subject: Remove old code Signed-off-by: Richard Qin --- .../c++/v1/experimental/__simd/aligned_tag.h | 75 ---- .../c++/v1/experimental/__simd/declaration.h | 88 ---- .../include/c++/v1/experimental/__simd/reference.h | 192 -------- .../include/c++/v1/experimental/__simd/scalar.h | 102 ----- .../include/c++/v1/experimental/__simd/simd.h | 155 ------- .../include/c++/v1/experimental/__simd/simd_mask.h | 97 ---- .../include/c++/v1/experimental/__simd/traits.h | 75 ---- .../include/c++/v1/experimental/__simd/utility.h | 103 ----- .../include/c++/v1/experimental/__simd/vec_ext.h | 130 ------ .../libcxx/include/c++/v1/experimental/iterator | 140 ------ .../libcxx/include/c++/v1/experimental/memory | 205 --------- .../include/c++/v1/experimental/propagate_const | 497 --------------------- .../libcxx/include/c++/v1/experimental/simd | 96 ---- .../libcxx/include/c++/v1/experimental/type_traits | 161 ------- .../libcxx/include/c++/v1/experimental/utility | 54 --- 15 files changed, 2170 deletions(-) delete mode 100644 third_party/libcxx/include/c++/v1/experimental/__simd/aligned_tag.h delete mode 100644 third_party/libcxx/include/c++/v1/experimental/__simd/declaration.h delete mode 100644 third_party/libcxx/include/c++/v1/experimental/__simd/reference.h delete mode 100644 third_party/libcxx/include/c++/v1/experimental/__simd/scalar.h delete mode 100644 third_party/libcxx/include/c++/v1/experimental/__simd/simd.h delete mode 100644 third_party/libcxx/include/c++/v1/experimental/__simd/simd_mask.h delete mode 100644 third_party/libcxx/include/c++/v1/experimental/__simd/traits.h delete mode 100644 third_party/libcxx/include/c++/v1/experimental/__simd/utility.h delete mode 100644 third_party/libcxx/include/c++/v1/experimental/__simd/vec_ext.h delete mode 100644 third_party/libcxx/include/c++/v1/experimental/iterator delete mode 100644 third_party/libcxx/include/c++/v1/experimental/memory delete mode 100644 third_party/libcxx/include/c++/v1/experimental/propagate_const delete mode 100644 third_party/libcxx/include/c++/v1/experimental/simd delete mode 100644 third_party/libcxx/include/c++/v1/experimental/type_traits delete mode 100644 third_party/libcxx/include/c++/v1/experimental/utility (limited to 'third_party/libcxx/include/c++/v1/experimental') diff --git a/third_party/libcxx/include/c++/v1/experimental/__simd/aligned_tag.h b/third_party/libcxx/include/c++/v1/experimental/__simd/aligned_tag.h deleted file mode 100644 index d208bf5..0000000 --- a/third_party/libcxx/include/c++/v1/experimental/__simd/aligned_tag.h +++ /dev/null @@ -1,75 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP_EXPERIMENTAL___SIMD_ALIGNED_TAG_H -#define _LIBCPP_EXPERIMENTAL___SIMD_ALIGNED_TAG_H - -#include <__config> -#include <__cstddef/size_t.h> -#include <__memory/assume_aligned.h> -#include <__type_traits/remove_const.h> -#include - -#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) - -_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL -inline namespace parallelism_v2 { -// memory alignment -struct element_aligned_tag { - template - static constexpr size_t __alignment = alignof(_Up); - - template - static _LIBCPP_HIDE_FROM_ABI constexpr _Up* __apply(_Up* __ptr) { - return __ptr; - } -}; - -template <> -inline constexpr bool is_simd_flag_type_v = true; - -struct vector_aligned_tag { - template - static constexpr size_t __alignment = memory_alignment_v<_Tp, remove_const_t<_Up>>; - - template - static _LIBCPP_HIDE_FROM_ABI constexpr _Up* __apply(_Up* __ptr) { - return std::__assume_aligned<__alignment<_Tp, _Up>, _Up>(__ptr); - } -}; - -template <> -inline constexpr bool is_simd_flag_type_v = true; - -template -struct overaligned_tag { - template - static constexpr size_t __alignment = _Np; - - template - static _LIBCPP_HIDE_FROM_ABI constexpr _Up* __apply(_Up* __ptr) { - return std::__assume_aligned<__alignment<_Tp, _Up>, _Up>(__ptr); - } -}; - -template -inline constexpr bool is_simd_flag_type_v> = true; - -inline constexpr element_aligned_tag element_aligned{}; - -inline constexpr vector_aligned_tag vector_aligned{}; - -template -inline constexpr overaligned_tag<_Np> overaligned{}; - -} // namespace parallelism_v2 -_LIBCPP_END_NAMESPACE_EXPERIMENTAL - -#endif // _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) -#endif // _LIBCPP_EXPERIMENTAL___SIMD_ALIGNED_TAG_H diff --git a/third_party/libcxx/include/c++/v1/experimental/__simd/declaration.h b/third_party/libcxx/include/c++/v1/experimental/__simd/declaration.h deleted file mode 100644 index d9395ba..0000000 --- a/third_party/libcxx/include/c++/v1/experimental/__simd/declaration.h +++ /dev/null @@ -1,88 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP_EXPERIMENTAL___SIMD_DECLARATION_H -#define _LIBCPP_EXPERIMENTAL___SIMD_DECLARATION_H - -#include <__config> -#include <__cstddef/size_t.h> - -#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) - -// 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 - -_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL -inline namespace parallelism_v2 { -namespace simd_abi { -template -struct __vec_ext; -struct __scalar; - -using scalar = __scalar; - -// TODO: make this platform dependent -template -using fixed_size = __vec_ext<_Np>; - -template -inline constexpr int max_fixed_size = 32; - -// TODO: make this platform dependent -template -using compatible = __vec_ext<16 / sizeof(_Tp)>; - -// TODO: make this platform dependent -template -using native = __vec_ext<_LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES / sizeof(_Tp)>; - -// TODO: make this platform dependent -template -struct deduce { - using type _LIBCPP_NODEBUG = fixed_size<_Np>; -}; - -// TODO: make this platform dependent -template -using deduce_t = typename deduce<_Tp, _Np, _Abis...>::type; - -} // namespace simd_abi - -template -struct __simd_storage; - -template -struct __mask_storage; - -template -struct __simd_operations; - -template -struct __mask_operations; - -struct element_aligned_tag; -struct vector_aligned_tag; -template -struct overaligned_tag; - -template > -class simd; - -template > -class simd_mask; - -} // namespace parallelism_v2 -_LIBCPP_END_NAMESPACE_EXPERIMENTAL - -#endif // _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) -#endif // _LIBCPP_EXPERIMENTAL___SIMD_DECLARATION_H diff --git a/third_party/libcxx/include/c++/v1/experimental/__simd/reference.h b/third_party/libcxx/include/c++/v1/experimental/__simd/reference.h deleted file mode 100644 index b9fe962..0000000 --- a/third_party/libcxx/include/c++/v1/experimental/__simd/reference.h +++ /dev/null @@ -1,192 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP_EXPERIMENTAL___SIMD_REFERENCE_H -#define _LIBCPP_EXPERIMENTAL___SIMD_REFERENCE_H - -#include <__config> -#include <__cstddef/size_t.h> -#include <__type_traits/enable_if.h> -#include <__type_traits/is_assignable.h> -#include <__type_traits/is_same.h> -#include <__utility/declval.h> -#include <__utility/forward.h> -#include <__utility/move.h> -#include - -_LIBCPP_PUSH_MACROS -#include <__undef_macros> - -#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) - -_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL -inline namespace parallelism_v2 { -template -class __simd_reference { - template - friend class simd; - template - friend class simd_mask; - - _Storage& __s_; - size_t __idx_; - - _LIBCPP_HIDE_FROM_ABI __simd_reference(_Storage& __s, size_t __idx) : __s_(__s), __idx_(__idx) {} - - _LIBCPP_HIDE_FROM_ABI _Vp __get() const noexcept { return __s_.__get(__idx_); } - - _LIBCPP_HIDE_FROM_ABI void __set(_Vp __v) { - if constexpr (is_same_v<_Vp, bool>) - __s_.__set(__idx_, experimental::__set_all_bits<_Tp>(__v)); - else - __s_.__set(__idx_, __v); - } - -public: - using value_type = _Vp; - - __simd_reference() = delete; - __simd_reference(const __simd_reference&) = delete; - - _LIBCPP_HIDE_FROM_ABI operator value_type() const noexcept { return __get(); } - - template , int> = 0> - _LIBCPP_HIDE_FROM_ABI __simd_reference operator=(_Up&& __v) && noexcept { - __set(static_cast(std::forward<_Up>(__v))); - return {__s_, __idx_}; - } - - // Note: This approach might not fully align with the specification, - // which might be a wording defect. (https://wg21.link/N4808 section 9.6.3) - template - friend void - swap(__simd_reference<_Tp1, _Storage1, _Vp1>&& __a, __simd_reference<_Tp1, _Storage1, _Vp1>&& __b) noexcept; - - template - friend void swap(_Vp1& __a, __simd_reference<_Tp1, _Storage1, _Vp1>&& __b) noexcept; - - template - friend void swap(__simd_reference<_Tp1, _Storage1, _Vp1>&& __a, _Vp1& __b) noexcept; - - template () += std::declval<_Up>())> - _LIBCPP_HIDE_FROM_ABI __simd_reference operator+=(_Up&& __v) && noexcept { - __set(__get() + static_cast(std::forward<_Up>(__v))); - return {__s_, __idx_}; - } - - template () -= std::declval<_Up>())> - _LIBCPP_HIDE_FROM_ABI __simd_reference operator-=(_Up&& __v) && noexcept { - __set(__get() - static_cast(std::forward<_Up>(__v))); - return {__s_, __idx_}; - } - - template () *= std::declval<_Up>())> - _LIBCPP_HIDE_FROM_ABI __simd_reference operator*=(_Up&& __v) && noexcept { - __set(__get() * static_cast(std::forward<_Up>(__v))); - return {__s_, __idx_}; - } - - template () /= std::declval<_Up>())> - _LIBCPP_HIDE_FROM_ABI __simd_reference operator/=(_Up&& __v) && noexcept { - __set(__get() / static_cast(std::forward<_Up>(__v))); - return {__s_, __idx_}; - } - - template () %= std::declval<_Up>())> - _LIBCPP_HIDE_FROM_ABI __simd_reference operator%=(_Up&& __v) && noexcept { - __set(__get() % static_cast(std::forward<_Up>(__v))); - return {__s_, __idx_}; - } - - template () &= std::declval<_Up>())> - _LIBCPP_HIDE_FROM_ABI __simd_reference operator&=(_Up&& __v) && noexcept { - __set(__get() & static_cast(std::forward<_Up>(__v))); - return {__s_, __idx_}; - } - - template () |= std::declval<_Up>())> - _LIBCPP_HIDE_FROM_ABI __simd_reference operator|=(_Up&& __v) && noexcept { - __set(__get() | static_cast(std::forward<_Up>(__v))); - return {__s_, __idx_}; - } - - template () ^= std::declval<_Up>())> - _LIBCPP_HIDE_FROM_ABI __simd_reference operator^=(_Up&& __v) && noexcept { - __set(__get() ^ static_cast(std::forward<_Up>(__v))); - return {__s_, __idx_}; - } - - template () <<= std::declval<_Up>())> - _LIBCPP_HIDE_FROM_ABI __simd_reference operator<<=(_Up&& __v) && noexcept { - __set(__get() << static_cast(std::forward<_Up>(__v))); - return {__s_, __idx_}; - } - - template () >>= std::declval<_Up>())> - _LIBCPP_HIDE_FROM_ABI __simd_reference operator>>=(_Up&& __v) && noexcept { - __set(__get() >> static_cast(std::forward<_Up>(__v))); - return {__s_, __idx_}; - } - - // Note: All legal vectorizable types support operator++/--. - // There doesn't seem to be a way to trigger the constraint. - // Therefore, no SFINAE check is added here. - __simd_reference _LIBCPP_HIDE_FROM_ABI operator++() && noexcept { - __set(__get() + 1); - return {__s_, __idx_}; - } - - value_type _LIBCPP_HIDE_FROM_ABI operator++(int) && noexcept { - auto __r = __get(); - __set(__get() + 1); - return __r; - } - - __simd_reference _LIBCPP_HIDE_FROM_ABI operator--() && noexcept { - __set(__get() - 1); - return {__s_, __idx_}; - } - - value_type _LIBCPP_HIDE_FROM_ABI operator--(int) && noexcept { - auto __r = __get(); - __set(__get() - 1); - return __r; - } -}; - -template -_LIBCPP_HIDE_FROM_ABI void -swap(__simd_reference<_Tp, _Storage, _Vp>&& __a, __simd_reference<_Tp, _Storage, _Vp>&& __b) noexcept { - _Vp __tmp(std::move(__a)); - std::move(__a) = std::move(__b); - std::move(__b) = std::move(__tmp); -} - -template -_LIBCPP_HIDE_FROM_ABI void swap(_Vp& __a, __simd_reference<_Tp, _Storage, _Vp>&& __b) noexcept { - _Vp __tmp(std::move(__a)); - __a = std::move(__b); - std::move(__b) = std::move(__tmp); -} - -template -_LIBCPP_HIDE_FROM_ABI void swap(__simd_reference<_Tp, _Storage, _Vp>&& __a, _Vp& __b) noexcept { - _Vp __tmp(std::move(__a)); - std::move(__a) = std::move(__b); - __b = std::move(__tmp); -} - -} // namespace parallelism_v2 -_LIBCPP_END_NAMESPACE_EXPERIMENTAL - -#endif // _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) - -_LIBCPP_POP_MACROS - -#endif // _LIBCPP_EXPERIMENTAL___SIMD_REFERENCE_H diff --git a/third_party/libcxx/include/c++/v1/experimental/__simd/scalar.h b/third_party/libcxx/include/c++/v1/experimental/__simd/scalar.h deleted file mode 100644 index 20c8b02..0000000 --- a/third_party/libcxx/include/c++/v1/experimental/__simd/scalar.h +++ /dev/null @@ -1,102 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP_EXPERIMENTAL___SIMD_SCALAR_H -#define _LIBCPP_EXPERIMENTAL___SIMD_SCALAR_H - -#include <__assert> -#include <__config> -#include <__cstddef/size_t.h> -#include <__type_traits/integral_constant.h> -#include -#include - -#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) - -_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL -inline namespace parallelism_v2 { -namespace simd_abi { -struct __scalar { - static constexpr size_t __simd_size = 1; -}; -} // namespace simd_abi - -template <> -inline constexpr bool is_abi_tag_v = true; - -template -struct __simd_storage<_Tp, simd_abi::__scalar> { - _Tp __data; - - _LIBCPP_HIDE_FROM_ABI _Tp __get([[maybe_unused]] size_t __idx) const noexcept { - _LIBCPP_ASSERT_UNCATEGORIZED(__idx == 0, "Index is out of bounds"); - return __data; - } - _LIBCPP_HIDE_FROM_ABI void __set([[maybe_unused]] size_t __idx, _Tp __v) noexcept { - _LIBCPP_ASSERT_UNCATEGORIZED(__idx == 0, "Index is out of bounds"); - __data = __v; - } -}; - -template -struct __mask_storage<_Tp, simd_abi::__scalar> : __simd_storage {}; - -template -struct __simd_operations<_Tp, simd_abi::__scalar> { - using _SimdStorage _LIBCPP_NODEBUG = __simd_storage<_Tp, simd_abi::__scalar>; - using _MaskStorage _LIBCPP_NODEBUG = __mask_storage<_Tp, simd_abi::__scalar>; - - static _LIBCPP_HIDE_FROM_ABI _SimdStorage __broadcast(_Tp __v) noexcept { return {__v}; } - - template - static _LIBCPP_HIDE_FROM_ABI _SimdStorage __generate(_Generator&& __g) noexcept { - return {__g(std::integral_constant())}; - } - - template - static _LIBCPP_HIDE_FROM_ABI void __load(_SimdStorage& __s, const _Up* __mem) noexcept { - __s.__data = static_cast<_Tp>(__mem[0]); - } - - template - static _LIBCPP_HIDE_FROM_ABI void __store(_SimdStorage __s, _Up* __mem) noexcept { - *__mem = static_cast<_Up>(__s.__data); - } - - static _LIBCPP_HIDE_FROM_ABI void __increment(_SimdStorage& __s) noexcept { ++__s.__data; } - - static _LIBCPP_HIDE_FROM_ABI void __decrement(_SimdStorage& __s) noexcept { --__s.__data; } - - static _LIBCPP_HIDE_FROM_ABI _MaskStorage __negate(_SimdStorage __s) noexcept { return {!__s.__data}; } - - static _LIBCPP_HIDE_FROM_ABI _SimdStorage __bitwise_not(_SimdStorage __s) noexcept { - return {static_cast<_Tp>(~__s.__data)}; - } - - static _LIBCPP_HIDE_FROM_ABI _SimdStorage __unary_minus(_SimdStorage __s) noexcept { - return {static_cast<_Tp>(-__s.__data)}; - } -}; - -template -struct __mask_operations<_Tp, simd_abi::__scalar> { - using _MaskStorage _LIBCPP_NODEBUG = __mask_storage<_Tp, simd_abi::__scalar>; - - static _LIBCPP_HIDE_FROM_ABI _MaskStorage __broadcast(bool __v) noexcept { return {__v}; } - - static _LIBCPP_HIDE_FROM_ABI void __load(_MaskStorage& __s, const bool* __mem) noexcept { __s.__data = __mem[0]; } - - static _LIBCPP_HIDE_FROM_ABI void __store(_MaskStorage __s, bool* __mem) noexcept { __mem[0] = __s.__data; } -}; - -} // namespace parallelism_v2 -_LIBCPP_END_NAMESPACE_EXPERIMENTAL - -#endif // _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) -#endif // _LIBCPP_EXPERIMENTAL___SIMD_SCALAR_H diff --git a/third_party/libcxx/include/c++/v1/experimental/__simd/simd.h b/third_party/libcxx/include/c++/v1/experimental/__simd/simd.h deleted file mode 100644 index 2fd2b26..0000000 --- a/third_party/libcxx/include/c++/v1/experimental/__simd/simd.h +++ /dev/null @@ -1,155 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP_EXPERIMENTAL___SIMD_SIMD_H -#define _LIBCPP_EXPERIMENTAL___SIMD_SIMD_H - -#include <__config> -#include <__cstddef/size_t.h> -#include <__type_traits/enable_if.h> -#include <__type_traits/is_integral.h> -#include <__type_traits/is_same.h> -#include <__type_traits/remove_cvref.h> -#include <__utility/forward.h> -#include -#include -#include -#include - -#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) - -_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL -inline namespace parallelism_v2 { - -template -class __simd_int_operators {}; - -template -class __simd_int_operators<_Simd, _Impl, true> { -public: - // unary operators for integral _Tp - _LIBCPP_HIDE_FROM_ABI _Simd operator~() const noexcept { - return _Simd(_Impl::__bitwise_not((*static_cast(this)).__s_), _Simd::__storage_tag); - } -}; - -// class template simd [simd.class] -// TODO: implement simd class -template -class simd : public __simd_int_operators, __simd_operations<_Tp, _Abi>, is_integral_v<_Tp>> { - using _Impl _LIBCPP_NODEBUG = __simd_operations<_Tp, _Abi>; - using _Storage _LIBCPP_NODEBUG = typename _Impl::_SimdStorage; - - _Storage __s_; - - friend class __simd_int_operators; - -public: - using value_type = _Tp; - using reference = __simd_reference<_Tp, _Storage, value_type>; - using mask_type = simd_mask<_Tp, _Abi>; - using abi_type = _Abi; - - static _LIBCPP_HIDE_FROM_ABI constexpr size_t size() noexcept { return simd_size_v; } - - _LIBCPP_HIDE_FROM_ABI simd() noexcept = default; - - // explicit conversion from and to implementation-defined types - struct __storage_tag_t {}; - static constexpr __storage_tag_t __storage_tag{}; - explicit _LIBCPP_HIDE_FROM_ABI operator _Storage() const { return __s_; } - explicit _LIBCPP_HIDE_FROM_ABI simd(const _Storage& __s, __storage_tag_t) : __s_(__s) {} - - // broadcast constructor - template >, int> = 0> - _LIBCPP_HIDE_FROM_ABI simd(_Up&& __v) noexcept : __s_(_Impl::__broadcast(static_cast(__v))) {} - - // implicit type conversion constructor - template && is_same_v> && - __is_non_narrowing_convertible_v<_Up, value_type>, - int> = 0> - _LIBCPP_HIDE_FROM_ABI simd(const simd<_Up, simd_abi::fixed_size>& __v) noexcept { - for (size_t __i = 0; __i < size(); __i++) { - (*this)[__i] = static_cast(__v[__i]); - } - } - - // generator constructor - template , int> = 0> - explicit _LIBCPP_HIDE_FROM_ABI simd(_Generator&& __g) noexcept - : __s_(_Impl::__generate(std::forward<_Generator>(__g))) {} - - // load constructor - template && is_simd_flag_type_v<_Flags>, int> = 0> - _LIBCPP_HIDE_FROM_ABI simd(const _Up* __mem, _Flags) { - _Impl::__load(__s_, _Flags::template __apply(__mem)); - } - - // copy functions - template && is_simd_flag_type_v<_Flags>, int> = 0> - _LIBCPP_HIDE_FROM_ABI void copy_from(const _Up* __mem, _Flags) { - _Impl::__load(__s_, _Flags::template __apply(__mem)); - } - - template && is_simd_flag_type_v<_Flags>, int> = 0> - _LIBCPP_HIDE_FROM_ABI void copy_to(_Up* __mem, _Flags) const { - _Impl::__store(__s_, _Flags::template __apply(__mem)); - } - - // scalar access [simd.subscr] - _LIBCPP_HIDE_FROM_ABI reference operator[](size_t __i) noexcept { return reference(__s_, __i); } - _LIBCPP_HIDE_FROM_ABI value_type operator[](size_t __i) const noexcept { return __s_.__get(__i); } - - // simd unary operators - _LIBCPP_HIDE_FROM_ABI simd& operator++() noexcept { - _Impl::__increment(__s_); - return *this; - } - - _LIBCPP_HIDE_FROM_ABI simd operator++(int) noexcept { - simd __r = *this; - _Impl::__increment(__s_); - return __r; - } - - _LIBCPP_HIDE_FROM_ABI simd& operator--() noexcept { - _Impl::__decrement(__s_); - return *this; - } - - _LIBCPP_HIDE_FROM_ABI simd operator--(int) noexcept { - simd __r = *this; - _Impl::__decrement(__s_); - return __r; - } - - _LIBCPP_HIDE_FROM_ABI mask_type operator!() const noexcept { - return mask_type(_Impl::__negate(__s_), mask_type::__storage_tag); - } - - _LIBCPP_HIDE_FROM_ABI simd operator+() const noexcept { return *this; } - - _LIBCPP_HIDE_FROM_ABI simd operator-() const noexcept { return simd(_Impl::__unary_minus(__s_), __storage_tag); } -}; - -template -inline constexpr bool is_simd_v> = true; - -template -using native_simd = simd<_Tp, simd_abi::native<_Tp>>; - -template -using fixed_size_simd = simd<_Tp, simd_abi::fixed_size<_Np>>; - -} // namespace parallelism_v2 -_LIBCPP_END_NAMESPACE_EXPERIMENTAL - -#endif // _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) -#endif // _LIBCPP_EXPERIMENTAL___SIMD_SIMD_H diff --git a/third_party/libcxx/include/c++/v1/experimental/__simd/simd_mask.h b/third_party/libcxx/include/c++/v1/experimental/__simd/simd_mask.h deleted file mode 100644 index a117665..0000000 --- a/third_party/libcxx/include/c++/v1/experimental/__simd/simd_mask.h +++ /dev/null @@ -1,97 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP_EXPERIMENTAL___SIMD_SIMD_MASK_H -#define _LIBCPP_EXPERIMENTAL___SIMD_SIMD_MASK_H - -#include <__config> -#include <__cstddef/size_t.h> -#include <__type_traits/enable_if.h> -#include <__type_traits/is_same.h> -#include -#include -#include - -#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) - -_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL -inline namespace parallelism_v2 { - -// class template simd_mask [simd.mask.class] -// TODO: implement simd_mask class -template -class simd_mask { - using _Impl _LIBCPP_NODEBUG = __mask_operations<_Tp, _Abi>; - using _Storage _LIBCPP_NODEBUG = typename _Impl::_MaskStorage; - - _Storage __s_; - -public: - using value_type = bool; - using reference = __simd_reference<_Tp, _Storage, value_type>; - using simd_type = simd<_Tp, _Abi>; - using abi_type = _Abi; - - static _LIBCPP_HIDE_FROM_ABI constexpr size_t size() noexcept { return simd_type::size(); } - - _LIBCPP_HIDE_FROM_ABI simd_mask() noexcept = default; - - // explicit conversion from and to implementation-defined types - struct __storage_tag_t {}; - static constexpr __storage_tag_t __storage_tag{}; - explicit _LIBCPP_HIDE_FROM_ABI operator _Storage() const { return __s_; } - explicit _LIBCPP_HIDE_FROM_ABI simd_mask(const _Storage& __s, __storage_tag_t) : __s_(__s) {} - - // broadcast constructor - _LIBCPP_HIDE_FROM_ABI explicit simd_mask(value_type __v) noexcept : __s_(_Impl::__broadcast(__v)) {} - - // implicit type conversion constructor - template && is_same_v>, int> = 0> - _LIBCPP_HIDE_FROM_ABI simd_mask(const simd_mask<_Up, simd_abi::fixed_size>& __v) noexcept { - for (size_t __i = 0; __i < size(); __i++) { - (*this)[__i] = __v[__i]; - } - } - - // load constructor - template , int> = 0> - _LIBCPP_HIDE_FROM_ABI simd_mask(const value_type* __mem, _Flags) { - _Impl::__load(__s_, _Flags::template __apply(__mem)); - } - - // copy functions - template , int> = 0> - _LIBCPP_HIDE_FROM_ABI void copy_from(const value_type* __mem, _Flags) { - _Impl::__load(__s_, _Flags::template __apply(__mem)); - } - - template , int> = 0> - _LIBCPP_HIDE_FROM_ABI void copy_to(value_type* __mem, _Flags) const { - _Impl::__store(__s_, _Flags::template __apply(__mem)); - } - - // scalar access [simd.mask.subscr] - _LIBCPP_HIDE_FROM_ABI reference operator[](size_t __i) noexcept { return reference(__s_, __i); } - _LIBCPP_HIDE_FROM_ABI value_type operator[](size_t __i) const noexcept { return __s_.__get(__i); } -}; - -template -inline constexpr bool is_simd_mask_v> = true; - -template -using native_simd_mask = simd_mask<_Tp, simd_abi::native<_Tp>>; - -template -using fixed_size_simd_mask = simd_mask<_Tp, simd_abi::fixed_size<_Np>>; - -} // namespace parallelism_v2 -_LIBCPP_END_NAMESPACE_EXPERIMENTAL - -#endif // _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) -#endif // _LIBCPP_EXPERIMENTAL___SIMD_SIMD_MASK_H diff --git a/third_party/libcxx/include/c++/v1/experimental/__simd/traits.h b/third_party/libcxx/include/c++/v1/experimental/__simd/traits.h deleted file mode 100644 index 0bcc2ee..0000000 --- a/third_party/libcxx/include/c++/v1/experimental/__simd/traits.h +++ /dev/null @@ -1,75 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP_EXPERIMENTAL___SIMD_TRAITS_H -#define _LIBCPP_EXPERIMENTAL___SIMD_TRAITS_H - -#include <__bit/bit_ceil.h> -#include <__config> -#include <__cstddef/size_t.h> -#include <__type_traits/integral_constant.h> -#include <__type_traits/is_same.h> -#include -#include - -#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) - -_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL -inline namespace parallelism_v2 { - -// traits [simd.traits] -template -inline constexpr bool is_abi_tag_v = false; - -template -struct is_abi_tag : bool_constant> {}; - -template -inline constexpr bool is_simd_v = false; - -template -struct is_simd : bool_constant> {}; - -template -inline constexpr bool is_simd_mask_v = false; - -template -struct is_simd_mask : bool_constant> {}; - -template -inline constexpr bool is_simd_flag_type_v = false; - -template -struct is_simd_flag_type : bool_constant> {}; - -template , bool = (__is_vectorizable_v<_Tp> && is_abi_tag_v<_Abi>)> -struct simd_size : integral_constant {}; - -template -struct simd_size<_Tp, _Abi, false> {}; - -template > -inline constexpr size_t simd_size_v = simd_size<_Tp, _Abi>::value; - -template && __is_vectorizable_v<_Up>) || (is_simd_mask_v<_Tp> && is_same_v<_Up, bool>)> -struct memory_alignment : integral_constant {}; - -template -struct memory_alignment<_Tp, _Up, false> {}; - -template -inline constexpr size_t memory_alignment_v = memory_alignment<_Tp, _Up>::value; - -} // namespace parallelism_v2 -_LIBCPP_END_NAMESPACE_EXPERIMENTAL - -#endif // _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) -#endif // _LIBCPP_EXPERIMENTAL___SIMD_TRAITS_H diff --git a/third_party/libcxx/include/c++/v1/experimental/__simd/utility.h b/third_party/libcxx/include/c++/v1/experimental/__simd/utility.h deleted file mode 100644 index 2af61e3..0000000 --- a/third_party/libcxx/include/c++/v1/experimental/__simd/utility.h +++ /dev/null @@ -1,103 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP_EXPERIMENTAL___SIMD_UTILITY_H -#define _LIBCPP_EXPERIMENTAL___SIMD_UTILITY_H - -#include <__config> -#include <__cstddef/size_t.h> -#include <__type_traits/is_arithmetic.h> -#include <__type_traits/is_const.h> -#include <__type_traits/is_constant_evaluated.h> -#include <__type_traits/is_convertible.h> -#include <__type_traits/is_same.h> -#include <__type_traits/is_unsigned.h> -#include <__type_traits/is_volatile.h> -#include <__type_traits/void_t.h> -#include <__utility/declval.h> -#include <__utility/integer_sequence.h> -#include -#include - -_LIBCPP_PUSH_MACROS -#include <__undef_macros> - -#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) - -_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL -inline namespace parallelism_v2 { -template -inline constexpr bool __is_vectorizable_v = - is_arithmetic_v<_Tp> && !is_const_v<_Tp> && !is_volatile_v<_Tp> && !is_same_v<_Tp, bool>; - -template -_LIBCPP_HIDE_FROM_ABI auto __choose_mask_type() { - if constexpr (sizeof(_Tp) == 1) { - return uint8_t{}; - } else if constexpr (sizeof(_Tp) == 2) { - return uint16_t{}; - } else if constexpr (sizeof(_Tp) == 4) { - return uint32_t{}; - } else if constexpr (sizeof(_Tp) == 8) { - return uint64_t{}; - } -# if _LIBCPP_HAS_INT128 - else if constexpr (sizeof(_Tp) == 16) { - return __uint128_t{}; - } -# endif - else - static_assert(sizeof(_Tp) == 0, "Unexpected size"); -} - -template -_LIBCPP_HIDE_FROM_ABI auto constexpr __set_all_bits(bool __v) { - return __v ? (numeric_limits())>::max()) : 0; -} - -template -inline constexpr bool __is_non_narrowing_convertible_v = false; - -template -inline constexpr bool __is_non_narrowing_convertible_v<_From, _To, std::void_t()})>> = - true; - -template -inline constexpr bool __can_broadcast_v = - (__is_vectorizable_v<_Up> && __is_non_narrowing_convertible_v<_Up, _Tp>) || - (!__is_vectorizable_v<_Up> && is_convertible_v<_Up, _Tp>) || is_same_v<_Up, int> || - (is_same_v<_Up, unsigned int> && is_unsigned_v<_Tp>); - -template -inline constexpr bool __is_well_formed = false; - -template -inline constexpr bool - __is_well_formed<_Tp, - _Generator, - _Idx, - std::void_t()(integral_constant()))>> = - __can_broadcast_v<_Tp, decltype(std::declval<_Generator>()(integral_constant()))>; - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool __can_generate(index_sequence<_Idxes...>) { - return (true && ... && __is_well_formed<_Tp, _Generator, _Idxes>); -} - -template -inline constexpr bool __can_generate_v = experimental::__can_generate<_Tp, _Generator>(make_index_sequence<_Size>()); - -} // namespace parallelism_v2 -_LIBCPP_END_NAMESPACE_EXPERIMENTAL - -#endif // _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) - -_LIBCPP_POP_MACROS - -#endif // _LIBCPP_EXPERIMENTAL___SIMD_UTILITY_H diff --git a/third_party/libcxx/include/c++/v1/experimental/__simd/vec_ext.h b/third_party/libcxx/include/c++/v1/experimental/__simd/vec_ext.h deleted file mode 100644 index 2a4b8c7..0000000 --- a/third_party/libcxx/include/c++/v1/experimental/__simd/vec_ext.h +++ /dev/null @@ -1,130 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP_EXPERIMENTAL___SIMD_VEC_EXT_H -#define _LIBCPP_EXPERIMENTAL___SIMD_VEC_EXT_H - -#include <__assert> -#include <__bit/bit_ceil.h> -#include <__config> -#include <__cstddef/size_t.h> -#include <__type_traits/integral_constant.h> -#include <__utility/forward.h> -#include <__utility/integer_sequence.h> -#include -#include -#include - -#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) - -_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL -inline namespace parallelism_v2 { -namespace simd_abi { -template -struct __vec_ext { - static constexpr size_t __simd_size = _Np; -}; -} // namespace simd_abi - -template -inline constexpr bool is_abi_tag_v> = _Np > 0 && _Np <= 32; - -template -struct __simd_storage<_Tp, simd_abi::__vec_ext<_Np>> { - _Tp __data __attribute__((__vector_size__(std::__bit_ceil((sizeof(_Tp) * _Np))))); - - _LIBCPP_HIDE_FROM_ABI _Tp __get(size_t __idx) const noexcept { - _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__idx < _Np, "Index is out of bounds"); - return __data[__idx]; - } - _LIBCPP_HIDE_FROM_ABI void __set(size_t __idx, _Tp __v) noexcept { - _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__idx < _Np, "Index is out of bounds"); - __data[__idx] = __v; - } -}; - -template -struct __mask_storage<_Tp, simd_abi::__vec_ext<_Np>> - : __simd_storage()), simd_abi::__vec_ext<_Np>> {}; - -template -struct __simd_operations<_Tp, simd_abi::__vec_ext<_Np>> { - using _SimdStorage _LIBCPP_NODEBUG = __simd_storage<_Tp, simd_abi::__vec_ext<_Np>>; - using _MaskStorage _LIBCPP_NODEBUG = __mask_storage<_Tp, simd_abi::__vec_ext<_Np>>; - - static _LIBCPP_HIDE_FROM_ABI _SimdStorage __broadcast(_Tp __v) noexcept { - _SimdStorage __result; - for (int __i = 0; __i < _Np; ++__i) { - __result.__set(__i, __v); - } - return __result; - } - - template - static _LIBCPP_HIDE_FROM_ABI _SimdStorage __generate_init(_Generator&& __g, std::index_sequence<_Is...>) { - return _SimdStorage{{__g(std::integral_constant())...}}; - } - - template - static _LIBCPP_HIDE_FROM_ABI _SimdStorage __generate(_Generator&& __g) noexcept { - return __generate_init(std::forward<_Generator>(__g), std::make_index_sequence<_Np>()); - } - - template - static _LIBCPP_HIDE_FROM_ABI void __load(_SimdStorage& __s, const _Up* __mem) noexcept { - for (size_t __i = 0; __i < _Np; __i++) - __s.__data[__i] = static_cast<_Tp>(__mem[__i]); - } - - template - static _LIBCPP_HIDE_FROM_ABI void __store(_SimdStorage __s, _Up* __mem) noexcept { - for (size_t __i = 0; __i < _Np; __i++) - __mem[__i] = static_cast<_Up>(__s.__data[__i]); - } - - static _LIBCPP_HIDE_FROM_ABI void __increment(_SimdStorage& __s) noexcept { __s.__data = __s.__data + 1; } - - static _LIBCPP_HIDE_FROM_ABI void __decrement(_SimdStorage& __s) noexcept { __s.__data = __s.__data - 1; } - - static _LIBCPP_HIDE_FROM_ABI _MaskStorage __negate(_SimdStorage __s) noexcept { return {!__s.__data}; } - - static _LIBCPP_HIDE_FROM_ABI _SimdStorage __bitwise_not(_SimdStorage __s) noexcept { return {~__s.__data}; } - - static _LIBCPP_HIDE_FROM_ABI _SimdStorage __unary_minus(_SimdStorage __s) noexcept { return {-__s.__data}; } -}; - -template -struct __mask_operations<_Tp, simd_abi::__vec_ext<_Np>> { - using _MaskStorage _LIBCPP_NODEBUG = __mask_storage<_Tp, simd_abi::__vec_ext<_Np>>; - - static _LIBCPP_HIDE_FROM_ABI _MaskStorage __broadcast(bool __v) noexcept { - _MaskStorage __result; - auto __all_bits_v = experimental::__set_all_bits<_Tp>(__v); - for (int __i = 0; __i < _Np; ++__i) { - __result.__set(__i, __all_bits_v); - } - return __result; - } - - static _LIBCPP_HIDE_FROM_ABI void __load(_MaskStorage& __s, const bool* __mem) noexcept { - for (size_t __i = 0; __i < _Np; __i++) - __s.__data[__i] = experimental::__set_all_bits<_Tp>(__mem[__i]); - } - - static _LIBCPP_HIDE_FROM_ABI void __store(_MaskStorage __s, bool* __mem) noexcept { - for (size_t __i = 0; __i < _Np; __i++) - __mem[__i] = static_cast(__s.__data[__i]); - } -}; - -} // namespace parallelism_v2 -_LIBCPP_END_NAMESPACE_EXPERIMENTAL - -#endif // _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) -#endif // _LIBCPP_EXPERIMENTAL___SIMD_VEC_EXT_H diff --git a/third_party/libcxx/include/c++/v1/experimental/iterator b/third_party/libcxx/include/c++/v1/experimental/iterator deleted file mode 100644 index 0ed9518..0000000 --- a/third_party/libcxx/include/c++/v1/experimental/iterator +++ /dev/null @@ -1,140 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP_EXPERIMENTAL_ITERATOR -#define _LIBCPP_EXPERIMENTAL_ITERATOR - -/* -namespace std { - namespace experimental { - inline namespace fundamentals_v2 { - - template > - class ostream_joiner { - public: - typedef charT char_type; - typedef traits traits_type; - typedef basic_ostream ostream_type; - typedef output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - - ostream_joiner(ostream_type& s, const DelimT& delimiter); - ostream_joiner(ostream_type& s, DelimT&& delimiter); - - template - ostream_joiner& operator=(const T& value); - - ostream_joiner& operator*() noexcept; - ostream_joiner& operator++() noexcept; - ostream_joiner& operator++(int) noexcept; - private: - ostream_type* out_stream; // exposition only - DelimT delim; // exposition only - bool first_element; // exposition only - }; - - template - ostream_joiner, charT, traits> - make_ostream_joiner(basic_ostream& os, DelimT&& delimiter); - - } // inline namespace fundamentals_v2 - } // namespace experimental -} // namespace std - -*/ - -#if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) -# include <__cxx03/__config> -#else -# include <__config> -# include <__memory/addressof.h> -# include <__ostream/basic_ostream.h> -# include <__string/char_traits.h> -# include <__type_traits/decay.h> -# include <__utility/forward.h> -# include <__utility/move.h> -# include - -# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -# endif - -_LIBCPP_PUSH_MACROS -# include <__undef_macros> - -# if _LIBCPP_STD_VER >= 14 - -_LIBCPP_BEGIN_NAMESPACE_LFTS - -template > -class ostream_joiner { -public: - typedef _CharT char_type; - typedef _Traits traits_type; - typedef basic_ostream ostream_type; - typedef output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - - _LIBCPP_HIDE_FROM_ABI ostream_joiner(ostream_type& __os, _Delim&& __d) - : __output_iter_(std::addressof(__os)), __delim_(std::move(__d)), __first_(true) {} - - _LIBCPP_HIDE_FROM_ABI ostream_joiner(ostream_type& __os, const _Delim& __d) - : __output_iter_(std::addressof(__os)), __delim_(__d), __first_(true) {} - - template - _LIBCPP_HIDE_FROM_ABI ostream_joiner& operator=(const _Tp& __v) { - if (!__first_) - *__output_iter_ << __delim_; - __first_ = false; - *__output_iter_ << __v; - return *this; - } - - _LIBCPP_HIDE_FROM_ABI ostream_joiner& operator*() _NOEXCEPT { return *this; } - _LIBCPP_HIDE_FROM_ABI ostream_joiner& operator++() _NOEXCEPT { return *this; } - _LIBCPP_HIDE_FROM_ABI ostream_joiner& operator++(int) _NOEXCEPT { return *this; } - -private: - ostream_type* __output_iter_; - _Delim __delim_; - bool __first_; -}; - -template -_LIBCPP_HIDE_FROM_ABI ostream_joiner<__decay_t<_Delim>, _CharT, _Traits> -make_ostream_joiner(basic_ostream<_CharT, _Traits>& __os, _Delim&& __d) { - return ostream_joiner<__decay_t<_Delim>, _CharT, _Traits>(__os, std::forward<_Delim>(__d)); -} - -_LIBCPP_END_NAMESPACE_LFTS - -# endif // _LIBCPP_STD_VER >= 14 - -_LIBCPP_POP_MACROS - -# if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 -# include -# include -# include -# include -# endif - -# if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 23 -# include -# endif - -#endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) - -#endif // _LIBCPP_EXPERIMENTAL_ITERATOR diff --git a/third_party/libcxx/include/c++/v1/experimental/memory b/third_party/libcxx/include/c++/v1/experimental/memory deleted file mode 100644 index ffbd8f3..0000000 --- a/third_party/libcxx/include/c++/v1/experimental/memory +++ /dev/null @@ -1,205 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP_EXPERIMENTAL_MEMORY -#define _LIBCPP_EXPERIMENTAL_MEMORY - -/* - experimental/memory synopsis - -namespace std::experimental::inline fundamentals_v2 { - -template class observer_ptr { -public: - using element_type = W; - using pointer = add_pointer_t; // exposition-only - using reference = add_lvalue_reference_t; // exposition-only - - // default ctor - constexpr observer_ptr() noexcept; - - // pointer-accepting ctors - constexpr observer_ptr(nullptr_t) noexcept; - constexpr explicit observer_ptr(pointer) noexcept; - - // copying ctors (in addition to compiler-generated copy ctor) - template constexpr observer_ptr(observer_ptr) noexcept; - - // observers - constexpr pointer get() const noexcept; - constexpr reference operator*() const; - constexpr pointer operator->() const noexcept; - constexpr explicit operator bool() const noexcept; - - // conversions - constexpr explicit operator pointer() const noexcept; - - // modifiers - constexpr pointer release() noexcept; - constexpr void reset(pointer = nullptr) noexcept; - constexpr void swap(observer_ptr&) noexcept; -}; - -} -*/ - -#if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) -# include <__cxx03/__config> -#else -# include <__config> -# include <__cstddef/nullptr_t.h> -# include <__cstddef/size_t.h> -# include <__functional/hash.h> -# include <__functional/operations.h> -# include <__type_traits/add_pointer.h> -# include <__type_traits/add_reference.h> -# include <__type_traits/common_type.h> -# include <__type_traits/enable_if.h> -# include <__type_traits/is_convertible.h> -# include - -# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -# endif - -# ifdef _LIBCPP_ENABLE_EXPERIMENTAL - -_LIBCPP_BEGIN_NAMESPACE_LFTS_V2 - -# if _LIBCPP_STD_VER >= 17 - -template -class observer_ptr { -public: - using element_type = _Wp; - - // constructors - _LIBCPP_HIDE_FROM_ABI constexpr observer_ptr() noexcept : __ptr_(nullptr) {} - _LIBCPP_HIDE_FROM_ABI constexpr observer_ptr(nullptr_t) noexcept : __ptr_(nullptr) {} - _LIBCPP_HIDE_FROM_ABI constexpr explicit observer_ptr(element_type* __p) noexcept : __ptr_(__p) {} - - template ::value, int> = 0> - _LIBCPP_HIDE_FROM_ABI constexpr observer_ptr(observer_ptr<_W2> __other) noexcept : __ptr_(__other.get()) {} - - // observers - _LIBCPP_HIDE_FROM_ABI constexpr element_type* get() const noexcept { return __ptr_; } - _LIBCPP_HIDE_FROM_ABI constexpr add_lvalue_reference_t<_Wp> operator*() const { return *__ptr_; } - _LIBCPP_HIDE_FROM_ABI constexpr element_type* operator->() const noexcept { return __ptr_; } - _LIBCPP_HIDE_FROM_ABI constexpr explicit operator bool() const noexcept { return __ptr_ != nullptr; } - - // conversions - _LIBCPP_HIDE_FROM_ABI constexpr explicit operator element_type*() const noexcept { return __ptr_; } - - // modifiers - _LIBCPP_HIDE_FROM_ABI constexpr void reset(element_type* __p = nullptr) noexcept { __ptr_ = __p; } - _LIBCPP_HIDE_FROM_ABI constexpr void swap(observer_ptr& __other) noexcept { - observer_ptr __tmp = __other; - __other = *this; - *this = __tmp; - } - _LIBCPP_HIDE_FROM_ABI constexpr element_type* release() noexcept { - observer_ptr __p; - __p.swap(*this); - return __p.get(); - } - -private: - element_type* __ptr_; -}; - -// specializations - -template -_LIBCPP_HIDE_FROM_ABI constexpr void swap(observer_ptr<_Wp>& __a, observer_ptr<_Wp>& __b) noexcept { - __a.swap(__b); -} - -template -_LIBCPP_HIDE_FROM_ABI observer_ptr<_Wp> make_observer(_Wp* __ptr) noexcept { - return observer_ptr<_Wp>{__ptr}; -} - -template -_LIBCPP_HIDE_FROM_ABI bool operator==(observer_ptr<_W1> __a, observer_ptr<_W2> __b) { - return __a.get() == __b.get(); -} - -template -_LIBCPP_HIDE_FROM_ABI bool operator!=(observer_ptr<_W1> __a, observer_ptr<_W2> __b) { - return !(__a == __b); -} - -template -_LIBCPP_HIDE_FROM_ABI bool operator==(observer_ptr<_Wp> __p, nullptr_t) { - return !__p; -} - -template -_LIBCPP_HIDE_FROM_ABI bool operator==(nullptr_t, observer_ptr<_Wp> __p) { - return !__p; -} - -template -_LIBCPP_HIDE_FROM_ABI bool operator!=(observer_ptr<_Wp> __p, nullptr_t) { - return (bool)__p; -} - -template -_LIBCPP_HIDE_FROM_ABI bool operator!=(nullptr_t, observer_ptr<_Wp> __p) { - return (bool)__p; -} - -template -_LIBCPP_HIDE_FROM_ABI bool operator<(observer_ptr<_W1> __a, observer_ptr<_W2> __b) { - return std::less::type>()(__a.get(), __b.get()); -} - -template -_LIBCPP_HIDE_FROM_ABI bool operator>(observer_ptr<_W1> __a, observer_ptr<_W2> __b) { - return __b < __a; -} - -template -_LIBCPP_HIDE_FROM_ABI bool operator<=(observer_ptr<_W1> __a, observer_ptr<_W2> __b) { - return !(__a > __b); -} - -template -_LIBCPP_HIDE_FROM_ABI bool operator>=(observer_ptr<_W1> __a, observer_ptr<_W2> __b) { - return !(__a < __b); -} - -# endif // _LIBCPP_STD_VER >= 17 - -_LIBCPP_END_NAMESPACE_LFTS_V2 - -_LIBCPP_BEGIN_NAMESPACE_STD - -// hash - -# if _LIBCPP_STD_VER >= 17 -template -struct hash> { - _LIBCPP_HIDE_FROM_ABI size_t operator()(const experimental::observer_ptr<_Tp>& __ptr) const noexcept { - return hash<_Tp*>()(__ptr.get()); - } -}; -# endif // _LIBCPP_STD_VER >= 17 - -_LIBCPP_END_NAMESPACE_STD - -# endif // _LIBCPP_ENABLE_EXPERIMENTAL - -# if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 -# include -# include -# endif -#endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) - -#endif /* _LIBCPP_EXPERIMENTAL_MEMORY */ diff --git a/third_party/libcxx/include/c++/v1/experimental/propagate_const b/third_party/libcxx/include/c++/v1/experimental/propagate_const deleted file mode 100644 index 6a7f8ae..0000000 --- a/third_party/libcxx/include/c++/v1/experimental/propagate_const +++ /dev/null @@ -1,497 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP_EXPERIMENTAL_PROPAGATE_CONST -#define _LIBCPP_EXPERIMENTAL_PROPAGATE_CONST - -/* - propagate_const synopsis - - namespace std { namespace experimental { inline namespace fundamentals_v2 { - - // [propagate_const] - template class propagate_const; - - // [propagate_const.underlying], underlying pointer access - constexpr const _Tp& get_underlying(const propagate_const& pt) noexcept; - constexpr T& get_underlying(propagate_const& pt) noexcept; - - // [propagate_const.relational], relational operators - template constexpr bool operator==(const propagate_const& pt, nullptr_t); - template constexpr bool operator==(nullptr_t, const propagate_const& pu); - template constexpr bool operator!=(const propagate_const& pt, nullptr_t); - template constexpr bool operator!=(nullptr_t, const propagate_const& pu); - template constexpr bool operator==(const propagate_const& pt, const propagate_const<_Up>& pu); - template constexpr bool operator!=(const propagate_const& pt, const propagate_const<_Up>& pu); - template constexpr bool operator<(const propagate_const& pt, const propagate_const<_Up>& pu); - template constexpr bool operator>(const propagate_const& pt, const propagate_const<_Up>& pu); - template constexpr bool operator<=(const propagate_const& pt, const propagate_const<_Up>& pu); - template constexpr bool operator>=(const propagate_const& pt, const propagate_const<_Up>& pu); - template constexpr bool operator==(const propagate_const& pt, const _Up& u); - template constexpr bool operator!=(const propagate_const& pt, const _Up& u); - template constexpr bool operator<(const propagate_const& pt, const _Up& u); - template constexpr bool operator>(const propagate_const& pt, const _Up& u); - template constexpr bool operator<=(const propagate_const& pt, const _Up& u); - template constexpr bool operator>=(const propagate_const& pt, const _Up& u); - template constexpr bool operator==(const _Tp& t, const propagate_const<_Up>& pu); - template constexpr bool operator!=(const _Tp& t, const propagate_const<_Up>& pu); - template constexpr bool operator<(const _Tp& t, const propagate_const<_Up>& pu); - template constexpr bool operator>(const _Tp& t, const propagate_const<_Up>& pu); - template constexpr bool operator<=(const _Tp& t, const propagate_const<_Up>& pu); - template constexpr bool operator>=(const _Tp& t, const propagate_const<_Up>& pu); - - // [propagate_const.algorithms], specialized algorithms - template constexpr void swap(propagate_const& pt, propagate_const& pu) noexcept(see below); - - template - class propagate_const - { - - public: - typedef remove_reference_t())> element_type; - - // [propagate_const.ctor], constructors - constexpr propagate_const() = default; - propagate_const(const propagate_const& p) = delete; - constexpr propagate_const(propagate_const&& p) = default; - template EXPLICIT constexpr propagate_const(propagate_const<_Up>&& pu); // see below - template EXPLICIT constexpr propagate_const(U&& u); // see below - - // [propagate_const.assignment], assignment - propagate_const& operator=(const propagate_const& p) = delete; - constexpr propagate_const& operator=(propagate_const&& p) = default; - template constexpr propagate_const& operator=(propagate_const<_Up>&& pu); - template constexpr propagate_const& operator=(U&& u); // see below - - // [propagate_const.const_observers], const observers - explicit constexpr operator bool() const; - constexpr const element_type* operator->() const; - constexpr operator const element_type*() const; // Not always defined - constexpr const element_type& operator*() const; - constexpr const element_type* get() const; - - // [propagate_const.non_const_observers], non-const observers - constexpr element_type* operator->(); - constexpr operator element_type*(); // Not always defined - constexpr element_type& operator*(); - constexpr element_type* get(); - - // [propagate_const.modifiers], modifiers - constexpr void swap(propagate_const& pt) noexcept(see below) - - private: - T t_; // exposition only - }; - - } // namespace fundamentals_v2 - } // namespace experimental - - // [propagate_const.hash], hash support - template struct hash>; - - // [propagate_const.comparison_function_objects], comparison function objects - template struct equal_to>; - template struct not_equal_to>; - template struct less>; - template struct greater>; - template struct less_equal>; - template struct greater_equal>; - -} // namespace std - -*/ - -#if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) -# include <__cxx03/__config> -#else -# include <__config> -# include <__cstddef/nullptr_t.h> -# include <__cstddef/size_t.h> -# include <__functional/operations.h> -# include <__fwd/functional.h> -# include <__type_traits/conditional.h> -# include <__type_traits/decay.h> -# include <__type_traits/enable_if.h> -# include <__type_traits/is_array.h> -# include <__type_traits/is_constructible.h> -# include <__type_traits/is_convertible.h> -# include <__type_traits/is_function.h> -# include <__type_traits/is_pointer.h> -# include <__type_traits/is_reference.h> -# include <__type_traits/is_same.h> -# include <__type_traits/is_swappable.h> -# include <__type_traits/remove_cv.h> -# include <__type_traits/remove_pointer.h> -# include <__type_traits/remove_reference.h> -# include <__utility/declval.h> -# include <__utility/forward.h> -# include <__utility/move.h> -# include <__utility/swap.h> -# include - -# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -# endif - -_LIBCPP_PUSH_MACROS -# include <__undef_macros> - -# if _LIBCPP_STD_VER >= 14 - -_LIBCPP_BEGIN_NAMESPACE_LFTS_V2 - -template -class propagate_const; - -template -inline _LIBCPP_HIDE_FROM_ABI constexpr const _Up& get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT; - -template -inline _LIBCPP_HIDE_FROM_ABI constexpr _Up& get_underlying(propagate_const<_Up>& __pu) _NOEXCEPT; - -template -class propagate_const { -public: - typedef remove_reference_t())> element_type; - - static_assert(!is_array<_Tp>::value, "Instantiation of propagate_const with an array type is ill-formed."); - static_assert(!is_reference<_Tp>::value, "Instantiation of propagate_const with a reference type is ill-formed."); - static_assert(!(is_pointer<_Tp>::value && is_function<__remove_pointer_t<_Tp> >::value), - "Instantiation of propagate_const with a function-pointer type is ill-formed."); - static_assert(!(is_pointer<_Tp>::value && is_same<__remove_cv_t<__remove_pointer_t<_Tp> >, void>::value), - "Instantiation of propagate_const with a pointer to (possibly cv-qualified) void is ill-formed."); - -private: - template - static _LIBCPP_HIDE_FROM_ABI constexpr element_type* __get_pointer(_Up* __u) { - return __u; - } - - template - static _LIBCPP_HIDE_FROM_ABI constexpr element_type* __get_pointer(_Up& __u) { - return __get_pointer(__u.get()); - } - - template - static _LIBCPP_HIDE_FROM_ABI constexpr const element_type* __get_pointer(const _Up* __u) { - return __u; - } - - template - static _LIBCPP_HIDE_FROM_ABI constexpr const element_type* __get_pointer(const _Up& __u) { - return __get_pointer(__u.get()); - } - - template - struct __is_propagate_const : false_type {}; - - template - struct __is_propagate_const> : true_type {}; - - _Tp __t_; - -public: - template - friend constexpr const _Up& experimental::fundamentals_v2::get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT; - template - friend constexpr _Up& experimental::fundamentals_v2::get_underlying(propagate_const<_Up>& __pu) _NOEXCEPT; - - _LIBCPP_HIDE_FROM_ABI constexpr propagate_const() = default; - - propagate_const(const propagate_const&) = delete; - - _LIBCPP_HIDE_FROM_ABI constexpr propagate_const(propagate_const&&) = default; - - template ::value && is_constructible<_Tp, _Up&&>::value, bool> = true> - explicit _LIBCPP_HIDE_FROM_ABI constexpr propagate_const(propagate_const<_Up>&& __pu) - : __t_(std::move(experimental::get_underlying(__pu))) {} - - template ::value && is_constructible<_Tp, _Up&&>::value, bool> = false> - _LIBCPP_HIDE_FROM_ABI constexpr propagate_const(propagate_const<_Up>&& __pu) - : __t_(std::move(experimental::get_underlying(__pu))) {} - - template ::value && is_constructible<_Tp, _Up&&>::value && - !__is_propagate_const>::value, - bool> = true> - explicit _LIBCPP_HIDE_FROM_ABI constexpr propagate_const(_Up&& __u) : __t_(std::forward<_Up>(__u)) {} - - template ::value && is_constructible<_Tp, _Up&&>::value && - !__is_propagate_const>::value, - bool> = false> - _LIBCPP_HIDE_FROM_ABI constexpr propagate_const(_Up&& __u) : __t_(std::forward<_Up>(__u)) {} - - propagate_const& operator=(const propagate_const&) = delete; - - _LIBCPP_HIDE_FROM_ABI constexpr propagate_const& operator=(propagate_const&&) = default; - - template - _LIBCPP_HIDE_FROM_ABI constexpr propagate_const& operator=(propagate_const<_Up>&& __pu) { - __t_ = std::move(experimental::get_underlying(__pu)); - return *this; - } - - template >::value>> - _LIBCPP_HIDE_FROM_ABI constexpr propagate_const& operator=(_Up&& __u) { - __t_ = std::forward<_Up>(__u); - return *this; - } - - _LIBCPP_HIDE_FROM_ABI constexpr const element_type* get() const { return __get_pointer(__t_); } - - _LIBCPP_HIDE_FROM_ABI constexpr element_type* get() { return __get_pointer(__t_); } - - _LIBCPP_HIDE_FROM_ABI explicit constexpr operator bool() const { return get() != nullptr; } - - _LIBCPP_HIDE_FROM_ABI constexpr const element_type* operator->() const { return get(); } - - template ::value>> - _LIBCPP_HIDE_FROM_ABI constexpr operator const element_type*() const { - return get(); - } - - _LIBCPP_HIDE_FROM_ABI constexpr const element_type& operator*() const { return *get(); } - - _LIBCPP_HIDE_FROM_ABI constexpr element_type* operator->() { return get(); } - - template ::value>> - _LIBCPP_HIDE_FROM_ABI constexpr operator element_type*() { - return get(); - } - - _LIBCPP_HIDE_FROM_ABI constexpr element_type& operator*() { return *get(); } - - _LIBCPP_HIDE_FROM_ABI constexpr void swap(propagate_const& __pt) noexcept(__is_nothrow_swappable_v<_Tp>) { - using std::swap; - swap(__t_, __pt.__t_); - } -}; - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator==(const propagate_const<_Tp>& __pt, nullptr_t) { - return experimental::get_underlying(__pt) == nullptr; -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator==(nullptr_t, const propagate_const<_Tp>& __pt) { - return nullptr == experimental::get_underlying(__pt); -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator!=(const propagate_const<_Tp>& __pt, nullptr_t) { - return experimental::get_underlying(__pt) != nullptr; -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator!=(nullptr_t, const propagate_const<_Tp>& __pt) { - return nullptr != experimental::get_underlying(__pt); -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator==(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { - return experimental::get_underlying(__pt) == experimental::get_underlying(__pu); -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator!=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { - return experimental::get_underlying(__pt) != experimental::get_underlying(__pu); -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator<(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { - return experimental::get_underlying(__pt) < experimental::get_underlying(__pu); -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator>(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { - return experimental::get_underlying(__pt) > experimental::get_underlying(__pu); -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator<=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { - return experimental::get_underlying(__pt) <= experimental::get_underlying(__pu); -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator>=(const propagate_const<_Tp>& __pt, const propagate_const<_Up>& __pu) { - return experimental::get_underlying(__pt) >= experimental::get_underlying(__pu); -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator==(const propagate_const<_Tp>& __pt, const _Up& __u) { - return experimental::get_underlying(__pt) == __u; -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator!=(const propagate_const<_Tp>& __pt, const _Up& __u) { - return experimental::get_underlying(__pt) != __u; -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator<(const propagate_const<_Tp>& __pt, const _Up& __u) { - return experimental::get_underlying(__pt) < __u; -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator>(const propagate_const<_Tp>& __pt, const _Up& __u) { - return experimental::get_underlying(__pt) > __u; -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator<=(const propagate_const<_Tp>& __pt, const _Up& __u) { - return experimental::get_underlying(__pt) <= __u; -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator>=(const propagate_const<_Tp>& __pt, const _Up& __u) { - return experimental::get_underlying(__pt) >= __u; -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator==(const _Tp& __t, const propagate_const<_Up>& __pu) { - return __t == experimental::get_underlying(__pu); -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator!=(const _Tp& __t, const propagate_const<_Up>& __pu) { - return __t != experimental::get_underlying(__pu); -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator<(const _Tp& __t, const propagate_const<_Up>& __pu) { - return __t < experimental::get_underlying(__pu); -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator>(const _Tp& __t, const propagate_const<_Up>& __pu) { - return __t > experimental::get_underlying(__pu); -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator<=(const _Tp& __t, const propagate_const<_Up>& __pu) { - return __t <= experimental::get_underlying(__pu); -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr bool operator>=(const _Tp& __t, const propagate_const<_Up>& __pu) { - return __t >= experimental::get_underlying(__pu); -} - -template -_LIBCPP_HIDE_FROM_ABI constexpr void -swap(propagate_const<_Tp>& __pc1, propagate_const<_Tp>& __pc2) noexcept(__is_nothrow_swappable_v<_Tp>) { - __pc1.swap(__pc2); -} - -template -constexpr const _Tp& get_underlying(const propagate_const<_Tp>& __pt) _NOEXCEPT { - return __pt.__t_; -} - -template -constexpr _Tp& get_underlying(propagate_const<_Tp>& __pt) _NOEXCEPT { - return __pt.__t_; -} - -_LIBCPP_END_NAMESPACE_LFTS_V2 - -_LIBCPP_BEGIN_NAMESPACE_STD - -template -struct hash> { - typedef size_t result_type; - typedef experimental::propagate_const<_Tp> argument_type; - - _LIBCPP_HIDE_FROM_ABI size_t operator()(const experimental::propagate_const<_Tp>& __pc1) const { - return std::hash<_Tp>()(experimental::get_underlying(__pc1)); - } -}; - -template -struct equal_to> { - typedef experimental::propagate_const<_Tp> first_argument_type; - typedef experimental::propagate_const<_Tp> second_argument_type; - - _LIBCPP_HIDE_FROM_ABI bool - operator()(const experimental::propagate_const<_Tp>& __pc1, const experimental::propagate_const<_Tp>& __pc2) const { - return std::equal_to<_Tp>()(experimental::get_underlying(__pc1), experimental::get_underlying(__pc2)); - } -}; - -template -struct not_equal_to> { - typedef experimental::propagate_const<_Tp> first_argument_type; - typedef experimental::propagate_const<_Tp> second_argument_type; - - _LIBCPP_HIDE_FROM_ABI bool - operator()(const experimental::propagate_const<_Tp>& __pc1, const experimental::propagate_const<_Tp>& __pc2) const { - return std::not_equal_to<_Tp>()(experimental::get_underlying(__pc1), experimental::get_underlying(__pc2)); - } -}; - -template -struct less> { - typedef experimental::propagate_const<_Tp> first_argument_type; - typedef experimental::propagate_const<_Tp> second_argument_type; - - _LIBCPP_HIDE_FROM_ABI bool - operator()(const experimental::propagate_const<_Tp>& __pc1, const experimental::propagate_const<_Tp>& __pc2) const { - return std::less<_Tp>()(experimental::get_underlying(__pc1), experimental::get_underlying(__pc2)); - } -}; - -template -struct greater> { - typedef experimental::propagate_const<_Tp> first_argument_type; - typedef experimental::propagate_const<_Tp> second_argument_type; - - _LIBCPP_HIDE_FROM_ABI bool - operator()(const experimental::propagate_const<_Tp>& __pc1, const experimental::propagate_const<_Tp>& __pc2) const { - return std::greater<_Tp>()(experimental::get_underlying(__pc1), experimental::get_underlying(__pc2)); - } -}; - -template -struct less_equal> { - typedef experimental::propagate_const<_Tp> first_argument_type; - typedef experimental::propagate_const<_Tp> second_argument_type; - - _LIBCPP_HIDE_FROM_ABI bool - operator()(const experimental::propagate_const<_Tp>& __pc1, const experimental::propagate_const<_Tp>& __pc2) const { - return std::less_equal<_Tp>()(experimental::get_underlying(__pc1), experimental::get_underlying(__pc2)); - } -}; - -template -struct greater_equal> { - typedef experimental::propagate_const<_Tp> first_argument_type; - typedef experimental::propagate_const<_Tp> second_argument_type; - - _LIBCPP_HIDE_FROM_ABI bool - operator()(const experimental::propagate_const<_Tp>& __pc1, const experimental::propagate_const<_Tp>& __pc2) const { - return std::greater_equal<_Tp>()(experimental::get_underlying(__pc1), experimental::get_underlying(__pc2)); - } -}; - -_LIBCPP_END_NAMESPACE_STD - -# endif // _LIBCPP_STD_VER >= 14 - -_LIBCPP_POP_MACROS - -# if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 -# include -# include -# endif -#endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) - -#endif // _LIBCPP_EXPERIMENTAL_PROPAGATE_CONST diff --git a/third_party/libcxx/include/c++/v1/experimental/simd b/third_party/libcxx/include/c++/v1/experimental/simd deleted file mode 100644 index 2e1c781..0000000 --- a/third_party/libcxx/include/c++/v1/experimental/simd +++ /dev/null @@ -1,96 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP_EXPERIMENTAL_SIMD -#define _LIBCPP_EXPERIMENTAL_SIMD - -/* - experimental/simd synopsis - -namespace std::experimental { -inline namespace parallelism_v2 { - namespace simd_abi { - using scalar = see below; - template using fixed_size = see below; - template inline constexpr int max_fixed_size = implementation-defined; - template using compatible = implementation-defined; - template using native = implementation-defined; - - template struct deduce { using type = see below; }; - template using deduce_t = - typename deduce::type; - } // namespace simd_abi - - // class template simd [simd.class] - template > class simd; - template using native_simd = simd>; - template using fixed_size_simd = simd>; - - // class template simd_mask [simd.mask.class] - template > class simd_mask; - template using native_simd_mask = simd_mask>; - template using fixed_size_simd_mask = simd_mask>; - - // memory alignment - struct element_aligned_tag {}; - struct vector_aligned_tag {}; - template struct overaligned_tag {}; - inline constexpr element_aligned_tag element_aligned{}; - inline constexpr vector_aligned_tag vector_aligned{}; - template inline constexpr overaligned_tag overaligned{}; - - // traits [simd.traits] - template struct is_abi_tag; - template inline constexpr bool is_abi_tag_v = is_abi_tag::value; - - template struct is_simd; - template inline constexpr bool is_simd_v = is_simd::value; - - template struct is_simd_mask; - template inline constexpr bool is_simd_mask_v = is_simd_mask::value; - - template struct is_simd_flag_type; - template inline constexpr bool is_simd_flag_type_v = is_simd_flag_type::value; - - template> struct simd_size; - template> - inline constexpr size_t simd_size_v = simd_size::value; - - template struct memory_alignment; - template - inline constexpr size_t memory_alignment_v = memory_alignment::value; - -} // namespace parallelism_v2 -} // namespace std::experimental - -*/ - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -#if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) -# include <__cxx03/__config> -#else -# include <__config> -# include -# include -# include -# include -# include -# include -# include -# include - -# if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 -# include -# endif -#endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) - -#endif /* _LIBCPP_EXPERIMENTAL_SIMD */ diff --git a/third_party/libcxx/include/c++/v1/experimental/type_traits b/third_party/libcxx/include/c++/v1/experimental/type_traits deleted file mode 100644 index fd03546..0000000 --- a/third_party/libcxx/include/c++/v1/experimental/type_traits +++ /dev/null @@ -1,161 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP_EXPERIMENTAL_TYPE_TRAITS -#define _LIBCPP_EXPERIMENTAL_TYPE_TRAITS - -/** - experimental/type_traits synopsis - -// C++1y -#include - -namespace std { -namespace experimental { -inline namespace fundamentals_v1 { - - // 3.3.2, Other type transformations - template class invocation_type; // not defined - template class invocation_type; - template class raw_invocation_type; // not defined - template class raw_invocation_type; - - template - using invocation_type_t = typename invocation_type::type; - template - using raw_invocation_type_t = typename raw_invocation_type::type; - - // 3.3.4, Detection idiom - template using void_t = void; - - struct nonesuch { - nonesuch() = delete; - ~nonesuch() = delete; - nonesuch(nonesuch const&) = delete; - void operator=(nonesuch const&) = delete; - }; - - template class Op, class... Args> - using is_detected = see below; - template class Op, class... Args> - constexpr bool is_detected_v = is_detected::value; - template class Op, class... Args> - using detected_t = see below; - template class Op, class... Args> - using detected_or = see below; - template class Op, class... Args> - using detected_or_t = typename detected_or::type; - template class Op, class... Args> - using is_detected_exact = is_same>; - template class Op, class... Args> - constexpr bool is_detected_exact_v - = is_detected_exact::value; - template class Op, class... Args> - using is_detected_convertible = is_convertible, To>; - template class Op, class... Args> - constexpr bool is_detected_convertible_v - = is_detected_convertible::value; - -} // namespace fundamentals_v1 -} // namespace experimental -} // namespace std - - */ - -#if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) -# include <__cxx03/__config> -#else -# include <__config> - -# if _LIBCPP_STD_VER >= 14 - -# include -# include - -# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -# endif - -_LIBCPP_BEGIN_NAMESPACE_LFTS - -// 3.3.2, Other type transformations -/* -template -class raw_invocation_type; - -template -class raw_invocation_type<_Fn(_Args...)>; - -template -class invokation_type; - -template -class invokation_type<_Fn(_Args...)>; - -template -using invokation_type_t = typename invokation_type<_Tp>::type; - -template -using raw_invocation_type_t = typename raw_invocation_type<_Tp>::type; -*/ - -// 3.3.4, Detection idiom -template -using void_t = void; - -struct nonesuch : private __nat { // make nonesuch "not an aggregate" - ~nonesuch() = delete; - nonesuch(nonesuch const&) = delete; - void operator=(nonesuch const&) = delete; -}; - -template class _Op, class... _Args> -struct _DETECTOR { - using value_t = false_type; - using type = _Default; -}; - -template class _Op, class... _Args> -struct _DETECTOR<_Default, void_t<_Op<_Args...>>, _Op, _Args...> { - using value_t = true_type; - using type = _Op<_Args...>; -}; - -template