|Summary:||Make Eigen faster in debug mode: EIGEN_FORCE_INLINING|
|Product:||Eigen||Reporter:||Gael Guennebaud <gael.guennebaud>|
|Severity:||Internal Design||CC:||chtz, gael.guennebaud, jacob.benoit.1|
|Version:||3.3 (current stable)|
|Bug Depends on:|
Description Gael Guennebaud 2012-03-08 21:58:52 UTC
see this thread: http://forum.kde.org/viewtopic.php?f=74&t=97734&p=215895 In order to make user code reasonably fast in debug mode, the idea would be to add a compile time EIGEN_FORCE_INLINING option that would add the always inline attribute to all simple eigen functions. This means that all simple functions should be qualified with at least an EIGEN_INLINE macro that would default to inline, and EIGEN_ALWAYS_INLINE_ATTRIB if EIGEN_FORCE_INLINING is defined.
Comment 1 Christoph Hertzberg 2014-11-02 18:52:12 UTC
While we are at it, I'd suggest defining custom attribute macros which in some way summarize all required attributes. E.g., most (but not all) inlined functions are EIGEN_DEVICE as well. How about having EIGEN_INLINE include DEVICE_FUNCTION (if compiled in CUDA mode), and provide a special EIGEN_INLINE_NO_DEVICE for code which is not CUDA compatible? This will also help to optionally add further attributes like constexpr (cf Bug 820) in the future.
Comment 2 Nobody 2019-12-04 11:32:09 UTC
-- 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/433.