From 548b6b7ae61f6fd2913fa5475ca8c3c523823e6d Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 25 Nov 2013 14:58:05 -0500 Subject: Only enable builtin vectors when clang is used --- test.cc | 18 ++++++++++++++++++ vecmathlib.h | 4 +++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/test.cc b/test.cc index 6d84877..4296f14 100644 --- a/test.cc +++ b/test.cc @@ -1626,57 +1626,75 @@ int main(int argc, char** argv) << flush; vecmathlib_test >::test(); +#ifdef __clang__ vecmathlib_test >::test(); +#endif vecmathlib_test >::test(); #ifdef VECMATHLIB_HAVE_VEC_FLOAT_1 vecmathlib_test >::test(); #endif vecmathlib_test >::test(); +#ifdef __clang__ vecmathlib_test >::test(); +#endif vecmathlib_test >::test(); #ifdef VECMATHLIB_HAVE_VEC_FLOAT_2 vecmathlib_test >::test(); #endif vecmathlib_test >::test(); +#ifdef __clang__ vecmathlib_test >::test(); +#endif vecmathlib_test >::test(); #ifdef VECMATHLIB_HAVE_VEC_FLOAT_4 vecmathlib_test >::test(); #endif #ifdef VECMATHLIB_HAVE_VEC_FLOAT_8 vecmathlib_test >::test(); +#ifdef __clang__ vecmathlib_test >::test(); +#endif vecmathlib_test >::test(); vecmathlib_test >::test(); #endif #ifdef VECMATHLIB_HAVE_VEC_FLOAT_16 vecmathlib_test >::test(); +#ifdef __clang__ vecmathlib_test >::test(); +#endif vecmathlib_test >::test(); vecmathlib_test >::test(); #endif vecmathlib_test >::test(); +#ifdef __clang__ vecmathlib_test >::test(); +#endif vecmathlib_test >::test(); #ifdef VECMATHLIB_HAVE_VEC_DOUBLE_1 vecmathlib_test >::test(); #endif vecmathlib_test >::test(); +#ifdef __clang__ vecmathlib_test >::test(); +#endif vecmathlib_test >::test(); #ifdef VECMATHLIB_HAVE_VEC_DOUBLE_2 vecmathlib_test >::test(); #endif #ifdef VECMATHLIB_HAVE_VEC_DOUBLE_4 vecmathlib_test >::test(); +#ifdef __clang__ vecmathlib_test >::test(); +#endif vecmathlib_test >::test(); vecmathlib_test >::test(); #endif #ifdef VECMATHLIB_HAVE_VEC_DOUBLE_8 vecmathlib_test >::test(); +#ifdef __clang__ vecmathlib_test >::test(); +#endif vecmathlib_test >::test(); vecmathlib_test >::test(); #endif diff --git a/vecmathlib.h b/vecmathlib.h index f5dfcf7..7956f73 100644 --- a/vecmathlib.h +++ b/vecmathlib.h @@ -94,8 +94,10 @@ namespace std { class type_info; } // useful as fallback) #include "vec_pseudo.h" +#ifdef __clang__ // Use compiler-provided vector types -#include "vec_builtin.h" +# include "vec_builtin.h" +#endif // Scalarise all vector operations; don't use libm, use only // Vecmathlib's functions (mostly useful for testing Vecmathlib) -- cgit v1.1