Skip to content
Snippets Groups Projects
Commit 9b443c39 authored by carlocamilloni's avatar carlocamilloni
Browse files

Merge branch 'v2.4' into v2.5

parents 22aaa406 fc15d7f3
No related branches found
No related tags found
No related merge requests found
...@@ -57,8 +57,8 @@ unsigned OpenMP::getGoodNumThreads(const T*x,unsigned n) { ...@@ -57,8 +57,8 @@ unsigned OpenMP::getGoodNumThreads(const T*x,unsigned n) {
// to cache line boundary // to cache line boundary
unsigned m=n*sizeof(T)/(2*getCachelineSize()); unsigned m=n*sizeof(T)/(2*getCachelineSize());
unsigned numThreads=getNumThreads(); unsigned numThreads=getNumThreads();
if(m>numThreads) m=numThreads; if(m>=numThreads) m=numThreads;
if(m==0) m=1; else m=1;
return m; return m;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment