New user self-registration is disabled due to spam. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
Bug 433 - Make Eigen faster in debug mode: EIGEN_FORCE_INLINING
Summary: Make Eigen faster in debug mode: EIGEN_FORCE_INLINING
Status: DECISIONNEEDED
Alias: None
Product: Eigen
Classification: Unclassified
Component: General (show other bugs)
Version: 3.3 (current stable)
Hardware: All All
: Low Internal Design
Assignee: Nobody
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks: 3.x
  Show dependency treegraph
 
Reported: 2012-03-08 21:58 UTC by Gael Guennebaud
Modified: 2018-10-09 20:33 UTC (History)
3 users (show)



Attachments

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.

Note You need to log in before you can comment on or make changes to this bug.