![]() Registered Member ![]()
|
Hi,
Is it possible to mix my own multithreading with and eigen's own multhreading for matrix-matrix products ? In some parts of my code, i would like to disable eigen's multithreading and write my own multithreaded code to manipulate eigen vectors and in other parts of the code, rely on eigen's own multithreaded matrix-matrix products. The documentation says how I can disable eigen's multithreading for the entire program by defining EIGEN_DONT_PARALLELIZE. Is there a way to switch this off locally ? My current applications don't require matrix-matrix products so I was doing my own multithreading and initializing with Eigen::initParallel(); wherever I multithreaded. Thanks! Ash P.S: I've been using eigen as the backbone of a Neural network that I'm using in my research and I'm very happy with it. Thanks so much for a wonderful tool !! |
![]() Moderator ![]()
|
You can call Eigen::setNumThreads(1) to locally disable Eigen's multithreading.
|
![]() Registered Member ![]()
|
|
![]() Registered Member ![]()
|
I had another question. Does Eigen multithread block matrix multiplication as well ? For example, for two matrices m1 and m2,
will m1.block(p,q,r,s) * m2.block(w,x,y,z) be multithreaded ? Thanks, Ash |
![]() Moderator ![]()
|
yes block or full matrix are the same.
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]