Hello Everyone,
        Since we have _Cilk_spawn and _Cilk_sync support in C++ compiler, we 
can enable the keyword usage in runtime. This patch should do so.

        Is it Ok to install?

Here are the ChangeLog entries:

2013-12-11  Balaji V. Iyer  <balaji.v.i...@intel.com>

        * Makefile.am (GENERAL_FLAGS): Removed un-defining of Cilk keywords.
        * Makefile.in: Regenerate.
        * runtime/symbol_test.c: Added a #define to clear out _Cilk_for.

Thanks,

Balaji V. Iyer.


Here is the patch.

diff --git a/libcilkrts/Makefile.am b/libcilkrts/Makefile.am
index 56bc9eb..d252087 100644
--- a/libcilkrts/Makefile.am
+++ b/libcilkrts/Makefile.am
@@ -38,7 +38,7 @@ ACLOCAL_AMFLAGS = -I .. -I ../config

 # Compiler and linker flags.
 GENERAL_FLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/runtime 
-I$(top_srcdir)/runtime/config/$(config_dir) -DIN_CILK_RUNTIME=1
-GENERAL_FLAGS += -D_Cilk_spawn="" -D_Cilk_sync="" -D_Cilk_for=for
+# GENERAL_FLAGS += -D_Cilk_spawn="" -D_Cilk_sync="" -D_Cilk_for=for

 # Enable Intel Cilk Plus extension
 GENERAL_FLAGS += -fcilkplus
diff --git a/libcilkrts/Makefile.in b/libcilkrts/Makefile.in
index 5066bef..94902e1 100644
--- a/libcilkrts/Makefile.in
+++ b/libcilkrts/Makefile.in
@@ -342,12 +342,12 @@ AUTOMAKE_OPTIONS = foreign
 ACLOCAL_AMFLAGS = -I .. -I ../config

 # Compiler and linker flags.
+# GENERAL_FLAGS += -D_Cilk_spawn="" -D_Cilk_sync="" -D_Cilk_for=for

 # Enable Intel Cilk Plus extension
 GENERAL_FLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/runtime \
        -I$(top_srcdir)/runtime/config/$(config_dir) \
-       -DIN_CILK_RUNTIME=1 -D_Cilk_spawn="" -D_Cilk_sync="" \
-       -D_Cilk_for=for -fcilkplus
+       -DIN_CILK_RUNTIME=1 -fcilkplus
 AM_CFLAGS = $(GENERAL_FLAGS) -std=c99
 AM_CPPFLAGS = $(GENERAL_FLAGS)
 AM_LDFLAGS = -lpthread
diff --git a/libcilkrts/runtime/symbol_test.c b/libcilkrts/runtime/symbol_test.c
index 1113ecd..8291d36 100644
--- a/libcilkrts/runtime/symbol_test.c
+++ b/libcilkrts/runtime/symbol_test.c
@@ -41,6 +41,7 @@
  * will cause a linker error.
  */

+#define _Cilk_for for
 extern void* __cilkrts_global_state;
 void *volatile p;

Reply via email to