aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2019-01-23 23:43:13 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2019-01-23 23:43:13 +0100
commitc64d5d3827f8d1ab0f33198721862115efe871da (patch)
tree97899a3566b8ec9ffa4fca2f6351d063ce4ae17a /bench
parente16913a45f92db9d4080c06515537ee287fdb153 (diff)
Bypass inline asm for non compatible compilers.
Diffstat (limited to 'bench')
-rw-r--r--bench/BenchTimer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/bench/BenchTimer.h b/bench/BenchTimer.h
index ea28496b7..8a0dbbe81 100644
--- a/bench/BenchTimer.h
+++ b/bench/BenchTimer.h
@@ -28,11 +28,15 @@
#endif
static void escape(void *p) {
+#if EIGEN_COMP_GNUC || EIGEN_COMP_CLANG
asm volatile("" : : "g"(p) : "memory");
+#endif
}
static void clobber() {
+#if EIGEN_COMP_GNUC || EIGEN_COMP_CLANG
asm volatile("" : : : "memory");
+#endif
}
#include <Eigen/Core>