mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Make clang generic vector backend support 16, 32, and 64-byte vectors
libeigen/eigen!2213 Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
@@ -186,6 +186,17 @@ ei_add_test(mixingtypes)
|
||||
ei_add_test(float_conversion)
|
||||
ei_add_test(io)
|
||||
ei_add_test(packetmath "-DEIGEN_FAST_MATH=1")
|
||||
# Generic clang vector backend tests for different vector sizes.
|
||||
include(CheckCXXSourceCompiles)
|
||||
check_cxx_source_compiles("
|
||||
typedef float v4sf __attribute__((ext_vector_type(4)));
|
||||
int main() { return __builtin_vectorelements(v4sf{}); }
|
||||
" COMPILER_SUPPORTS_VECTOR_EXTENSIONS)
|
||||
if(COMPILER_SUPPORTS_VECTOR_EXTENSIONS)
|
||||
ei_add_test(packetmath_generic_16 "-DEIGEN_FAST_MATH=1")
|
||||
ei_add_test(packetmath_generic_32 "-DEIGEN_FAST_MATH=1")
|
||||
ei_add_test(packetmath_generic_64 "-DEIGEN_FAST_MATH=1")
|
||||
endif()
|
||||
ei_add_test(packet_segment)
|
||||
ei_add_test(vectorization_logic)
|
||||
ei_add_test(basicstuff)
|
||||
|
||||
4
test/packetmath_generic_16.cpp
Normal file
4
test/packetmath_generic_16.cpp
Normal file
@@ -0,0 +1,4 @@
|
||||
// Force the generic clang vector backend with 16-byte vectors.
|
||||
#define EIGEN_VECTORIZE_GENERIC 1
|
||||
#define EIGEN_GENERIC_VECTOR_SIZE_BYTES 16
|
||||
#include "packetmath.cpp"
|
||||
4
test/packetmath_generic_32.cpp
Normal file
4
test/packetmath_generic_32.cpp
Normal file
@@ -0,0 +1,4 @@
|
||||
// Force the generic clang vector backend with 32-byte vectors.
|
||||
#define EIGEN_VECTORIZE_GENERIC 1
|
||||
#define EIGEN_GENERIC_VECTOR_SIZE_BYTES 32
|
||||
#include "packetmath.cpp"
|
||||
4
test/packetmath_generic_64.cpp
Normal file
4
test/packetmath_generic_64.cpp
Normal file
@@ -0,0 +1,4 @@
|
||||
// Force the generic clang vector backend with 64-byte vectors.
|
||||
#define EIGEN_VECTORIZE_GENERIC 1
|
||||
#define EIGEN_GENERIC_VECTOR_SIZE_BYTES 64
|
||||
#include "packetmath.cpp"
|
||||
Reference in New Issue
Block a user