summaryrefslogtreecommitdiff
path: root/src/localconsts.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/localconsts.h')
-rw-r--r--src/localconsts.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/localconsts.h b/src/localconsts.h
index 4c4827d70..7cddefdcd 100644
--- a/src/localconsts.h
+++ b/src/localconsts.h
@@ -81,17 +81,26 @@
#define gnu_printf printf
#endif
+#ifdef ENABLE_CILKPLUS
+#include <cilk/cilk.h>
+#endif
+
#ifdef __GNUC__
#ifdef ENABLE_CILKPLUS
-#if GCC_VERSION < 50000
-#define cilk_for for
-#elif GCC_VERSION < 49000
+#if GCC_VERSION < 40900
#define cilk_for for
#define cilk_spawn
-#endif // GCC_VERSION < 50000
+#define cilk_sync
+#elif GCC_VERSION < 50000
+#ifdef cilk_for
+#undef cilk_for
+#endif // cilk_for
+#define cilk_for for
+#endif // GCC_VERSION < 40900
#else // ENABLE_CILKPLUS
#define cilk_for for
#define cilk_spawn
+#define cilk_sync
#endif // ENABLE_CILKPLUS
#endif // __GNUC__
@@ -157,7 +166,3 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-
-#ifdef ENABLE_CILKPLUS
-#include <cilk/cilk.h>
-#endif