I'm using OpenMP but the problem is that I'm declaring/defining a function as follow:
void compute_image(double pixel[nb], double &sum)
{
#pragma omp parallel for reduction(+:sum)
for (int j=0;j<640;j++)
{
if ...
sum=sum+pixel[0];
....
}
....
}
What I realise now is that :
Error 2 error C3030: 'sum' : variable in 'reduction' clause/directive cannot have reference type C:\Users...\test.cpp 930
Actually, I cannot get rid of OpenMP. Any solution?