From d2614759a1d542c41af59b04d8711246d2a1e876 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 30 Nov 2012 15:50:03 -0500 Subject: Import initial version --- example.cc | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 example.cc (limited to 'example.cc') diff --git a/example.cc b/example.cc new file mode 100644 index 0000000..50415c2 --- /dev/null +++ b/example.cc @@ -0,0 +1,32 @@ +// -*-C++-*- + +#include "vec_float.h" +#include "vec_double_avx.h" + +#include + +using namespace std; + +int main(int argc, char** argv) +{ + using namespace vecmathlib; + typedef realvec realvec_t; + // typedef realvec realvec_t; + typedef realvec_t::boolvec_t boolvec_t; + typedef realvec_t::intvec_t intvec_t; + + realvec_t x = 1.0; + realvec_t y = x + realvec_t(1.0); + y = sqrt(y); + realvec_t z = log(y); + boolvec_t b = x < y; + intvec_t i = convert_int(y); + + cout << "x=" << x << "\n"; + cout << "y=" << y << "\n"; + cout << "z=" << z << "\n"; + cout << "b=" << b << "\n"; + cout << "i=" << i << "\n"; + + return 0; +} -- cgit v1.1