|
Boost : |
Subject: Re: [boost] [GSoC] SIMD proposal
From: Gruenke, Matt (mgruenke_at_[hidden])
Date: 2011-03-23 20:16:28
cpuid? It seems to me that the *only* thing that should determine how the program gets compiled is the compiler flags, since the target platform might have either less or more capability than the build machine. I've experienced both cases, firsthand.
GCC will define the following preprocessor macros, depending on which code generation flags you specify:
__MMX__
__SSE__
__SSE2__
__SSE3__
__SSSE3__
__SSE4A__
__SSE4_1__
__SSE4_2__
__AES__
__PCLMUL__
__AVX__
Matt
________________________________
From: boost-bounces_at_[hidden] on behalf of Mathias Gaunard
Sent: Wed 3/23/2011 7:44 PM
To: boost_at_[hidden]
Subject: Re: [boost] [GSoC] SIMD proposal
On 23/03/2011 21:45, Mathieu - wrote:
> One of the main concern I
> have is that nt2 relies heavily on cmake to detect various things like
> SSE instruction set support etc.
The library must know what instruction sets are available on the target
machine. This is done using a configuration header file that contains
macros that exist if the instruction sets in question are available.
That configuration header can be either written manually or be generated
by the build system.
On x86, we use a program that calls the 'cpuid' instruction (using
inline assembler) which directly gives the processor capabilities. Then
we check the compiler allows their usage (MSVC Express Edition does not
allow SSE3+).
...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk