Summary: | Parallel assignment | ||
---|---|---|---|
Product: | Eigen | Reporter: | Jonas Adler <jonas_lajv> |
Component: | Core - general | Assignee: | Nobody <eigen.nobody> |
Status: | DECISIONNEEDED --- | ||
Severity: | Feature Request | CC: | chtz, gael.guennebaud, jacob.benoit.1 |
Priority: | Normal | ||
Version: | 3.4 (development) | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Jonas Adler
2015-07-26 11:35:43 UTC
Interesting idea. We only have parallelization for Matrix*Matrix products integrated so far, but even for that it might be worth-while to give the user control on where to enable or disable parallelization. How much do you gain with parallelization, in your example? I'd suggest making some benchmarks how much you gain (depending on operation/scalar type/vectorization/number of cores, etc), before going into implementation details. Side topic: If you do a lot of .row(*) operations on A, have you tried storing it row-major? I would assume this has a big impact on performance as well -- especially, if the rows are aligned to packet-sizes this would make it possible to vectorize the operation (could gain near 2-8 speed-up depending on architecture and scalar type). This is definitely a wanted feature. At the time of Eigen 2.0, I've also experimented with omp for coefficient-wise evaluation: https://bitbucket.org/eigen/eigen/src/429fa67a258fd3e0c60483f12341be23970c0a77/disabled/EvalOMP.h?at=2.0 but at that time compilers and common CPU were not that good to leverage significant speed up. Nowadays, I've also experienced very nice speed-up with omp and simple coefficient-wise loops. Actually, a similar feature is already available in the unsupported/Tensors module. It is implemented through a "Device" template parameter of the evaluator. This mechanism is more general as it allows for different multi-threading backends, GPUs, etc: https://bitbucket.org/eigen/eigen/src/e8733e565660e6e1d3b48be52864352117872f7c/unsupported/Eigen/CXX11/src/Tensor/?at=default#markdown-header-controlling-how-expressions-are-evaluated -- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1044. |