|
Boost : |
Subject: Re: [boost] [GSOC]SIMD Library
From: Tim Blechmann (tim_at_[hidden])
Date: 2011-03-31 07:11:57
>> 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.
tim
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk