summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-02-14 16:56:37 -0500
committerErik Schnetter <schnetter@gmail.com>2013-02-14 16:56:37 -0500
commit54f420716524cba7ef8a20bf04fcfed80cff9ed2 (patch)
treecb42f9b6b46816cebee8d43e2c69a0a90dfb4819
parent9973fb4cf3b916f4a52c373d161b8423b915e6c4 (diff)
downloadvecmathlib-54f420716524cba7ef8a20bf04fcfed80cff9ed2.zip
vecmathlib-54f420716524cba7ef8a20bf04fcfed80cff9ed2.tar.gz
Add "instantiations.cc" to look at generated machine code
-rw-r--r--.gitignore1
-rw-r--r--CMakeLists.txt3
-rw-r--r--instantiations.cc33
3 files changed, 37 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 7854e42..ba65ab9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@ bench
rules.ninja
build.ninja
loop
+instantiations
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b72c1bd..abe7db7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,6 +7,9 @@ add_executable (example example.cc)
add_executable (loop loop.cc)
add_executable (test test.cc)
add_executable (bench bench.cc)
+add_executable (instantiations instantiations.cc)
+
+
# GCC:
# set (CMAKE_CXX_COMPILER "g++")
diff --git a/instantiations.cc b/instantiations.cc
new file mode 100644
index 0000000..fe3be6e
--- /dev/null
+++ b/instantiations.cc
@@ -0,0 +1,33 @@
+// Instantiante some functions to be able to inspect the generated
+// machine code
+
+#define NDEBUG
+#define VML_NODEBUG
+
+#include "vecmathlib.h"
+
+using namespace std;
+
+namespace vecmathlib {
+
+#ifdef VECMATHLIB_HAVE_VEC_DOUBLE_1
+ template realvec<double,1> sin(realvec<double,1> x);
+ template realvec<double,1> sqrt(realvec<double,1> x);
+#endif
+
+#ifdef VECMATHLIB_HAVE_VEC_DOUBLE_2
+ template realvec<double,2> sin(realvec<double,2> x);
+ template realvec<double,2> sqrt(realvec<double,2> x);
+#endif
+
+#ifdef VECMATHLIB_HAVE_VEC_DOUBLE_4
+ template realvec<double,4> sin(realvec<double,4> x);
+ template realvec<double,4> sqrt(realvec<double,4> x);
+#endif
+
+}
+
+int main()
+{
+ return 0;
+}
OpenPOWER on IntegriCloud