| 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 ]
| Create interfaces to the high level functions (e.g. foo) and create a dll compiling with each option, then load the correct one at run-time? 
 Rob From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx> Sent: Tuesday, January 27, 2015 4:29 PM To: eigen Subject: [eigen] How do you link multiple versions (e.g. AVX vs SSE) of the same Eigen code? Hi List,The question has been around for a long time: one often needs to compile Eigen code with multiple sets of compiler flags, and select at runtime between them, to take advantage of possibly-present CPU features such as AVX. #include <Eigen/Core> namespace avx_code_path { void foo(Eigen::Vector4f& v) { v += v; } } Benoit | 
| Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |