Compile C file with Cilk Plus array notation

123 Views Asked by At

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

1

There are 1 best solutions below

4
Shawn On

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.