Skip to content

Commit 154f393

Browse files
committed
Re-apply "[libcxx] implement <simd> ABI for Clang/GCC vector extension, constructors, copy_from and copy_to."
...with proper guarding #ifdefs for unsupported C++11. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@338318 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent b6244cf commit 154f393

18 files changed

+1481
-445
lines changed

include/__config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,8 @@ namespace std {
620620

621621
#define _LIBCPP_ALWAYS_INLINE __forceinline
622622

623+
#define _LIBCPP_HAS_NO_VECTOR_EXTENSION
624+
623625
#elif defined(_LIBCPP_COMPILER_IBM)
624626

625627
#define _ALIGNAS(x) __attribute__((__aligned__(x)))
@@ -652,6 +654,8 @@ namespace std {
652654

653655
#define _LIBCPP_ALWAYS_INLINE __attribute__ ((__always_inline__))
654656

657+
#define _LIBCPP_HAS_NO_VECTOR_EXTENSION
658+
655659
#endif // _LIBCPP_COMPILER_[CLANG|GCC|MSVC|IBM]
656660

657661
#if _LIBCPP_STD_VER >= 17

include/experimental/__config

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,11 @@
6464
#define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD_ABI \
6565
} _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD
6666

67+
// TODO: support more targets
68+
#if defined(__AVX__)
69+
#define _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES 32
70+
#else
71+
#define _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES 16
72+
#endif
73+
6774
#endif

0 commit comments

Comments
 (0)