summaryrefslogtreecommitdiffstats
path: root/vec_builtin.h
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-11-25 14:54:13 -0500
committerErik Schnetter <schnetter@gmail.com>2013-11-25 14:54:13 -0500
commit942b1fa0654668576d3990c9c3ad721aaf703f7e (patch)
treee42ecbef9e0bc836528db5c33259fe80b3a783e2 /vec_builtin.h
parentec33e3b30b4324cad3f5c26186cc2d2620708a0f (diff)
downloadvecmathlib-942b1fa0654668576d3990c9c3ad721aaf703f7e.zip
vecmathlib-942b1fa0654668576d3990c9c3ad721aaf703f7e.tar.gz
If VML_NO_IOSTREAM is set, then don’t provide any iostream operations
This reduces the size of the library.
Diffstat (limited to 'vec_builtin.h')
-rw-r--r--vec_builtin.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/vec_builtin.h b/vec_builtin.h
index d8a8a45..7d99deb 100644
--- a/vec_builtin.h
+++ b/vec_builtin.h
@@ -11,7 +11,9 @@
#include <algorithm>
#include <cmath>
#include <cstring>
-#include <sstream>
+#ifndef VML_NO_IOSTREAM
+# include <sstream>
+#endif
#include <string>
@@ -320,6 +322,7 @@ namespace vecmathlib {
static_assert(size * sizeof(real_t) == sizeof(vector_t),
"vector size is wrong");
+#ifndef VML_NO_IOSTREAM
static const char* name()
{
static std::string name_;
@@ -331,6 +334,7 @@ namespace vecmathlib {
return name_.c_str();
}
void barrier() { volatile vector_t x __attribute__((__unused__)) = v; }
+#endif
typedef boolbuiltinvec<real_t, size> boolvec_t;
typedef intbuiltinvec<real_t, size> intvec_t;
OpenPOWER on IntegriCloud