|
Boost : |
Subject: Re: [boost] Accelerating algorithms with SIMD - Segmented iterators and alternatives
From: joel falcou (joel.falcou_at_[hidden])
Date: 2010-10-12 13:38:52
On 12/10/10 19:31, Thomas Klimpel wrote:
> DE wrote:
>
>> so my question is: do you expect code writers which want their
>> binaries work across all modern x86 processors (starting with pentium)
>> to write plain version along with accelerated one? or will your
>> implementation fall back to plain old say x87 when sse2 is not
>> available so the writer could write only one version of source?
>>
> But how is this different from specifying appropriate compile options for the platforms you intent to support? Even the code generated by a compiler will only work on the processor architectures that the compiler targeted. And if you tell the compiler to target the lowest common denominator, the resulting code will be quite slow.
>
When no SSEx stuff are enabled, pack<T,N> falls back to boost::array
emulation.
If you wan to ship code for various SSex flavor, just make various
compialtion fo your kernel code
then dynamically laod the correct one. There is no way you can check at
runtime before calling EVERY
function, this is far too costly.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk