diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-01-07 20:17:59 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-01-07 20:17:59 +0100 |
commit | ac409f51f185a4654f9a5c38ab5d1652824836f6 (patch) | |
tree | ea683be3cc788424f88043a81dc3f594160e0598 /doc/TopicMultithreading.dox | |
parent | a6a57748ddff8ffc7e00e256385bd83423f68acb (diff) |
Document the fact that Random and setRandom are not reentrant (so not thread-safe)
Diffstat (limited to 'doc/TopicMultithreading.dox')
-rw-r--r-- | doc/TopicMultithreading.dox | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/TopicMultithreading.dox b/doc/TopicMultithreading.dox index f7d082668..fb944af29 100644 --- a/doc/TopicMultithreading.dox +++ b/doc/TopicMultithreading.dox @@ -39,6 +39,8 @@ int main(int argc, char** argv) } \endcode +\warning note that all functions generating random matrices are \b not re-entrant nor thread-safe. Those include DenseBase::Random(), and DenseBase::setRandom() despite a call to Eigen::initParallel(). This is because these functions are based on std::rand which is not re-entrant. For thread-safe random generator, we recommend the use of boost::random of c++11 random feature. + In the case your application is parallelized with OpenMP, you might want to disable Eigen's own parallization as detailed in the previous section. */ |