Registered Member
|
Hi
I want to use Eigen 3 and multithreading. Therefore I have questions: 1) Does Eigen 3 have a multithreaded "matrix-vector" product? 2) If I use openMP in my program, then Eigen 3 is also multithreaded? Example: I have 4 threads, which do some calculations with different parameters - does Eigen 3 use 4 threads or more? 3) Is Eigen 3 "threadsafe", can I use Eigen 3 and Open MPI? |
Moderator
|
no, currently only matrix-matrix products are multithreaded.
Eigen uses OpenMP for the parallelization, so you can use OpenMP API to control the number of threads, or the function: Eigen::setNbThreads(n); to overwrite default OpenMP settings for Eigen only.
Eigen's objects and methods are as thread-safe as a std::vector for instance. gael |
Registered Member
|
Hi ggael,
is there a reason for that or did you just not have enough time, yet? Cheers, Manuel PS: I'm loving Eigen! |
Moderator
|
time, and I also need to find a way to factorize the multithreading logic which represent a quite large amount of code and that's far to be trivial.
|
Registered users: Bing [Bot], blue_bullet, Google [Bot], Sogou [Bot]