Re: [eigen] Can I force (or hint) Eigen to not vectorise a particular expression?

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi,

first of all, this is related to this bug:
http://eigen.tuxfamily.org/bz/show_bug.cgi?id=404

On 21.04.2014 13:10, Daniel.Vollmer@xxxxxx wrote:
The vectorisation overhead for these small dynamic matrices is bigger than the gain (verified with -DEIGEN_DONT_VECTORIZE).
Without the DONT_VECTORIZE define (because I don't want this behaviour everywhere), is there
a way to tell Eigen not to vectorise a particular expression or operations on the matrix?

I see two solutions that might work in your case:
* Separate methods for which you don't want vectorization into a
  different compilation unit (EIGEN_DONT_VECTORIZE maintains ABI
  compatibility, so you can still link those together)
* If you have a limited range of block-sizes (known at compile-time),
  you may consider implementing it using a virtual class with
  specializations for each occurring block size.  You'll need some kind
  of non-virtual intermediate class, which will introduce additional
  overhead, so overall it might not be worth the effort.


Christoph


--
----------------------------------------------
Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
Cartesium 0.049
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen

Tel: +49 (421) 218-64252
----------------------------------------------



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/