Answer the question
In order to leave comments, you need to log in
Why do programs load multiple threads even if they don't contain multi-threaded code?
Here on this site https://benchmarksgame-team.pages.debian.net/bench... it is shown that the program, for example, loads all 4 threads at 100%, but if you look at the code itself, there is not a single line about multithreading , how is this possible ?
Answer the question
In order to leave comments, you need to log in
Link to multi-threaded program
#pragma omp parallel for
for (i = 0; i < n; i++) {
__m128d sum = _mm_setzero_pd();
int j;
for (j = 0; j < n; j += 2) {
__m128d b = _mm_set_pd(v[j],v[j+1]);
__m128d a = _mm_set_pd(A(i,j), A(i,j+1));
sum = _mm_add_pd(sum, _mm_div_pd(b, a));
}
out[i] = sum[0] + sum[1];
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question