Bugzilla – Attachment 665 Details for
Bug 1169
thread local storage for the Eigen thread count
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
This bugzilla service is closed. All entries have been migrated to
https://gitlab.com/libeigen/eigen
testcase
Test1169.C (text/x-csrc), 476 bytes, created by
fabien chĂȘne
on 2016-03-11 13:01:28 UTC
(
hide
)
Description:
testcase
Filename:
MIME Type:
Creator:
fabien chĂȘne
Created:
2016-03-11 13:01:28 UTC
Size:
476 bytes
patch
obsolete
>#include <Eigen/Core> >#include <cassert> >#include <omp.h> > >int main() >{ > int k = 0; > >#pragma omp parallel > { > int threads = omp_get_thread_num() + 1; > Eigen::setNbThreads( threads ); // or Eigen::setNbThreadsInThisThread( threads ) > > // do some work... > for( int j = 0; j < 20; j++ ) > { > k += j; > } > > assert( Eigen::nbThreads() == threads ); // or Eigen::nbThreadsInThisThread() > } > > assert( k != 0 ); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1169
:
654
| 665