Re: [eigen] How do you link multiple versions (e.g. AVX vs SSE) of the same Eigen code?

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


Am 27.01.2015 um 22:29 schrieb Benoit Jacob:
Any better approach?

It's also a hack, but maybe also putting the #include inside your custom namespace works:

// depending on compile-flags:
#define CURRENT_CODE_PATH avx_code_path

namespace CURRENT_CODE_PATH {

#include <Eigen/Core>
void foo(Eigen::Vector4f& v)
{
     v += v;
}

}


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/