
"Mathias Gaunard" <mathias.gaunard@ens-lyon.org> wrote in message news:imvhgr$a19$1@dough.gmane.org...
On 30/03/2011 15:11, Domagoj Saric wrote:
ps. does NT2 provide a way to choose/use multiple instruction sets?
Not out of the box. What you could do is compile your code several times with different options and make each version into a separate dll, then select the right dll to load at runtime.
Alternatively you could also compile the code at runtime.
We have things that can do that in the work for NT2 that we use for OpenCL.
Yes but 'runtime compilation' and/or separate DLLs are not always the ideal (or possible) solution...If you could provide something along the lines of what Cory Nelson suggested that would be great :) Otherwise we are left with the awkwardness of making a header template that is included in different .cpp files compiled with different preprocessor directives...
Important so that one can, for example, detect the level of SSE supported by the machine and switch to an appropriate routine...
Boost.SIMD does not have knowledge of high-level routines, and obviously you don't want to switch on each basic function...
Of course, I was thinking of higher level routines (whether provided by the library or by me/the user)... -- "What Huxley teaches is that in the age of advanced technology, spiritual devastation is more likely to come from an enemy with a smiling face than from one whose countenance exudes suspicion and hate." Neil Postman