I want to pass the index of array to routine, that uses it inside to compute and return some result, that should be assigned to output array member.
I mean the following:
for(int i=0; i<I_max; i++) a_output[i] = foo(i, a1,a2, ...);
Instead of this loop I tried to use CILK+ Array Notation construction:
a_output[0:I_max] = foo(__sec_implicit_index(0) , a1,a2, ...);
This lines cause the error (compiler Intel C++ Compiler XE 14.0):
1> CilkArrNot_test.cpp 1>D:\CilkArrNot_test\CilkArrNot_test\CilkArrNot_test.cpp(37): warning #18024: implicit index must be used in an array section context 1>" : error : ** segmentation violation signal raised **
What is the problem in the code line above ?
Maybe it is a bad idea to use __sec_implicit_index(0) for such a goal ? What is the right way to collapse the given loop to array section operation ?