0

In my available code, there is a line of Cilk Plus array notation:

C[0:n*n]=0.0;

When I compile it by running command on Linux:

gcc  matrix.cc -o matrix

I encounter this error Error

Which command I would use to fix this? Thank in advance

Duy Duy
  • 521
  • 1
  • 4
  • 9

1 Answers1

0

To use Cilk (Plus) with gcc, you have to enable it with the -fcilkplus option.

However... Cilk support was deprecated in gcc 7.1 and removed in gcc 8.1, so unless you're using an older version, that's not going to help. It'd be better to rewrite your code to not use Cilk if you want it to be usable going forward in the future.

Shawn
  • 47,241
  • 3
  • 26
  • 60
  • OpenMP is a good alternative for easy parallelization of loops (and vectorization hints). – Shawn Mar 28 '21 at 07:19
  • if not using gcc command, is there any other way for Cilk+? tks – Duy Duy Mar 28 '21 at 15:57
  • i don't think cilk-plus array notation is officially supported by any compiler as of today. unofficial support could still be present in intel c++/fortran compiler. – zam Mar 29 '21 at 06:29
  • @DuyDuy Check the list of Cilk+ compilers on WIkipedia, see if any are still maintained or available. – Shawn Mar 29 '21 at 06:52