EigenRand icon indicating copy to clipboard operation
EigenRand copied to clipboard

Support for Eigen 5.0.X

Open Copilot opened this issue 3 months ago • 2 comments

EigenRand was limited to Eigen 3.3.4–3.4.1 due to an explicit version check. Eigen 5.0.X maintains backward compatibility with the packet math APIs that EigenRand uses.

Changes

  • Remove upper version bound (!EIGEN_VERSION_AT_LEAST(3,4,2)) that blocked newer Eigen versions
  • Add EIGENRAND_EIGEN_50_MODE macro for Eigen 5.0.0+, which also enables EIGENRAND_EIGEN_34_MODE since the 3.4.x code paths remain compatible
  • Update error message to indicate minimum version requirement only
  • Add Eigen 5.0.0 to CI workflow test matrix for all platforms (Linux, macOS, Windows, ARM64)
  • Add logic to set C++14 standard when building with Eigen 5.x (required by Eigen 5.x)
#if EIGEN_VERSION_AT_LEAST(5,0,0)
#define EIGENRAND_EIGEN_50_MODE
#define EIGENRAND_EIGEN_34_MODE
#elif EIGEN_VERSION_AT_LEAST(3,3,10)
#define EIGENRAND_EIGEN_34_MODE
#elif EIGEN_VERSION_AT_LEAST(3,3,4)
#define EIGENRAND_EIGEN_33_MODE
#endif

Closes #78

  • Fixes bab2min/EigenRand#63
Original prompt

This section details on the original issue you should resolve

<issue_title>Support for new Eigen version 5.0.X</issue_title> <issue_description>Eigen released new version 5.0.1 last week, coming with some breaking changes as stated by the dev team. I like EigenRand a lot, but I am not sure whether it is usable with the new 5.0.X eigen version. If @bab2min you have time, would you please add support for the new version? Thanks for the lib anyway!</issue_description>

Comments on the Issue (you are @copilot in this section)

  • Fixes bab2min/EigenRand#63

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot avatar Dec 01 '25 12:12 Copilot