diff options
author | Erik Schnetter <schnetter@gmail.com> | 2013-02-14 16:56:37 -0500 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2013-02-14 16:56:37 -0500 |
commit | 54f420716524cba7ef8a20bf04fcfed80cff9ed2 (patch) | |
tree | cb42f9b6b46816cebee8d43e2c69a0a90dfb4819 | |
parent | 9973fb4cf3b916f4a52c373d161b8423b915e6c4 (diff) | |
download | vecmathlib-54f420716524cba7ef8a20bf04fcfed80cff9ed2.zip vecmathlib-54f420716524cba7ef8a20bf04fcfed80cff9ed2.tar.gz |
Add "instantiations.cc" to look at generated machine code
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | instantiations.cc | 33 |
3 files changed, 37 insertions, 0 deletions
@@ -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; +} |