Answer the question
In order to leave comments, you need to log in
openmp. How to parallelize a loop?
Hello, please help with the parallelization of this loop on OpenMP. Thanks in advance.
for (i = 0; i < N; i++)
{
result[i] = 0;
for ( j=RowIndex[i]; j<RowIndex[i + 1]; j++)
{
if (i == col[j])
result[i] += val[j] * vector[col[j]];
else
{
result[i] += val[j] * vector[col[j]];
result[col[j]] += val[j] * vector[i];
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question