I'm trying to make a parallel cilk code of this code using cilk_for:
c[0:2*n-1] = 0;
for (size_t i=0; i<n; ++i)
c[i:n] += a[i]*b[0:n];
in serial code:
for( size_t j=0; j<2*n-1; ++j )
c[j] = 0;
for (size_t i=0; i<n; ++i)
for( size_t j=0; j<n; ++j )
c[i+j] += a[i]*b[j];
For example:
x^2+x+1
2x^2+3x+5
C[0]=A[0]·B[0]
C[1]=A[0]·B[1]+A[1]·B[0]
.....