2
$\begingroup$

Eigen's documentation says that any BLAS back-end can be used (e.g. MKL) to perform the actual matrix calculations.

It is, however, very vague when discussing the criteria as to which the calculations are offloaded (with added emphasis):

When doing so, a number of Eigen's algorithms are silently substituted with calls to BLAS or LAPACK routines. These substitutions apply only for Dynamic or large enough objects with one of the following four standard scalar types: float, double, complex, and complex. Operations on other scalar types or mixing reals and complexes will continue to use the built-in algorithms.

Unfortunately, there is no further guidance as to what is considered "large enough".

So my questions are:

  • What is the criteria to be considered "large enough"
  • Does it vary by platform?
  • Is this dynamically determined?
  • Can it be controlled by the user?

Background: I have small (25-50 square) matrices, but are large-ish on the embedded platform (Intel Atom Silvermont) we are using. Since this consumes a significant amount of CPU, I am looking to experiment with BLAS back-ends without having to substantially re-write code.

$\endgroup$
  • $\begingroup$ Does "dynamic" mean size that isn't known at compile-time? This can probably only be answered by looking at Eigen's source, rather than docs, or by attaching a debugger to your code and stepping through it to see what checks it makes. $\endgroup$ – Kirill Jun 14 '17 at 4:31
  • $\begingroup$ @Kirill, Eigen gives the option of either dynamically sized (heap), fixed size (stack), or dynamic with a maximum size (stack). See Eigen for more details. $\endgroup$ – Damien Jun 14 '17 at 9:08
  • $\begingroup$ Did you get any answer on this? $\endgroup$ – Royi May 13 '18 at 12:50
  • $\begingroup$ @Royi, no such luck. I guess we will need to dig into the source ... $\endgroup$ – Damien May 15 '18 at 5:05
  • $\begingroup$ Have you tries asking this on Eigen's forum - forum.kde.org/viewforum.php?f=74 (Yes, I know, very old forum framework)? $\endgroup$ – Royi May 15 '18 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.