|
Boost : |
Subject: Re: [boost] Boost SIMD beta release
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2012-12-20 09:09:13
On Thu, Dec 20, 2012 at 5:49 PM, Thorsten Ottosen
<thorsten.ottosen_at_[hidden]> wrote:
> On 20-12-2012 12:52, Mathias Gaunard wrote:
>
>> You can choose which extension to generate code for at compile time.
>>
>> The approach we recommend is to compile various versions of your
>> function with different settings, and then choose the right one at
>> runtime depending on the host capabilities.
>> We provide functions to easily check whether an extension is supported.
>
>
> That seems cool. Can illegal instructions be in a binary as long as they are
> not exeuted?
Yes, no problem with that.
The suggested approach has a nasty potential problem though. You have
to be extra careful so that no common inline functions are compiled in
different translation units with different compiler settings.
Otherwise you may have ODR violation and it is unspecified which
version of such functions end up in the compiled binary.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk