summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-11-25 14:58:05 -0500
committerErik Schnetter <schnetter@gmail.com>2013-11-25 14:58:05 -0500
commit548b6b7ae61f6fd2913fa5475ca8c3c523823e6d (patch)
tree59529d51133de835a2e2e94b08a433ed077a6af7
parent36f7de41c871def89b0245748d29ac2c2dae0609 (diff)
downloadvecmathlib-548b6b7ae61f6fd2913fa5475ca8c3c523823e6d.zip
vecmathlib-548b6b7ae61f6fd2913fa5475ca8c3c523823e6d.tar.gz
Only enable builtin vectors when clang is used
-rw-r--r--test.cc18
-rw-r--r--vecmathlib.h4
2 files changed, 21 insertions, 1 deletions
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<realpseudovec<float,1> >::test();
+#ifdef __clang__
vecmathlib_test<realbuiltinvec<float,1> >::test();
+#endif
vecmathlib_test<realtestvec<float,1> >::test();
#ifdef VECMATHLIB_HAVE_VEC_FLOAT_1
vecmathlib_test<realvec<float,1> >::test();
#endif
vecmathlib_test<realpseudovec<float,2> >::test();
+#ifdef __clang__
vecmathlib_test<realbuiltinvec<float,2> >::test();
+#endif
vecmathlib_test<realtestvec<float,2> >::test();
#ifdef VECMATHLIB_HAVE_VEC_FLOAT_2
vecmathlib_test<realvec<float,2> >::test();
#endif
vecmathlib_test<realpseudovec<float,4> >::test();
+#ifdef __clang__
vecmathlib_test<realbuiltinvec<float,4> >::test();
+#endif
vecmathlib_test<realtestvec<float,4> >::test();
#ifdef VECMATHLIB_HAVE_VEC_FLOAT_4
vecmathlib_test<realvec<float,4> >::test();
#endif
#ifdef VECMATHLIB_HAVE_VEC_FLOAT_8
vecmathlib_test<realpseudovec<float,8> >::test();
+#ifdef __clang__
vecmathlib_test<realbuiltinvec<float,8> >::test();
+#endif
vecmathlib_test<realtestvec<float,8> >::test();
vecmathlib_test<realvec<float,8> >::test();
#endif
#ifdef VECMATHLIB_HAVE_VEC_FLOAT_16
vecmathlib_test<realpseudovec<float,16> >::test();
+#ifdef __clang__
vecmathlib_test<realbuiltinvec<float,16> >::test();
+#endif
vecmathlib_test<realtestvec<float,16> >::test();
vecmathlib_test<realvec<float,16> >::test();
#endif
vecmathlib_test<realpseudovec<double,1> >::test();
+#ifdef __clang__
vecmathlib_test<realbuiltinvec<double,1> >::test();
+#endif
vecmathlib_test<realtestvec<double,1> >::test();
#ifdef VECMATHLIB_HAVE_VEC_DOUBLE_1
vecmathlib_test<realvec<double,1> >::test();
#endif
vecmathlib_test<realpseudovec<double,2> >::test();
+#ifdef __clang__
vecmathlib_test<realbuiltinvec<double,2> >::test();
+#endif
vecmathlib_test<realtestvec<double,2> >::test();
#ifdef VECMATHLIB_HAVE_VEC_DOUBLE_2
vecmathlib_test<realvec<double,2> >::test();
#endif
#ifdef VECMATHLIB_HAVE_VEC_DOUBLE_4
vecmathlib_test<realpseudovec<double,4> >::test();
+#ifdef __clang__
vecmathlib_test<realbuiltinvec<double,4> >::test();
+#endif
vecmathlib_test<realtestvec<double,4> >::test();
vecmathlib_test<realvec<double,4> >::test();
#endif
#ifdef VECMATHLIB_HAVE_VEC_DOUBLE_8
vecmathlib_test<realpseudovec<double,8> >::test();
+#ifdef __clang__
vecmathlib_test<realbuiltinvec<double,8> >::test();
+#endif
vecmathlib_test<realtestvec<double,8> >::test();
vecmathlib_test<realvec<double,8> >::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)
OpenPOWER on IntegriCloud