Boost logo

Boost :

Subject: Re: [boost] [GSOC]SIMD Library
From: Domagoj Saric (domagoj.saric_at_[hidden])
Date: 2011-03-31 09:27:18


"Tim Blechmann" <tim_at_[hidden]> wrote in message
news:in1nhu$jej$1_at_dough.gmane.org...
>>> GCC generates a compile-time error if you include the intrinsics files
>>> without the right option (-msse2 or similar) enabled with the compiler.
>>> For this reason, we took care of only including the files requested by
>>> the
>>> instruction set the user has chosen.
>>
>> Yes, the GCC solution is not quite the ideal one for this problem...If I,
>> for example, want to use SSE3 but only if it is available I obviously
>> cannot
>> pass -msse3 because it will use SSE3 code for the whole binary (which
>> will
>> then of course crash on SSE2 machines) but if I do not pass -msse3 then I
>> do
>> not get the intrinsics at all...The "what were they thinking" question
>> does
>> pop up...
>
> the usual approach of implementing a runtime-dispatching is to compile
> different
> source files for different instruction sets.

That's the usual approach with GCC-like compilers because they force you to
do it that way...the MSVC approach (always giving you access to all
intrinsics) works better in these situations (IMHO)...

-- 
"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 

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk