Subject: Re: [boost] Boost SIMD beta release
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-12-20 06:52:12
On 20/12/2012 10:27, Thorsten Ottosen wrote:
> On 20-12-2012 07:50, joel falcou wrote:
>> We're rolling a beta release of Boost.SIMD along with a beta release of
> I looked through the slides. It all looks very impressive! Well done.
> I would love to use SIMD extensions for some of our mathematical tools.
> We often face some obstacles though.
> A. Programs are deployed at our customers' customers, meaning we
> have to be very conservative about which SSE extension to use.
> Currently, we disable SSE. Question: do your library allow one to
> customize which extension to generate code for?
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.
> B. Floating point precision is crucial in some of our software. Maybe
> you could provide kahan_sum and high-precision normalization functions?
> Do you know if there are any problems about the precision in SIMD code?
We took great care of guaranteeing high precision with all our
functions, along with nan/inf support and, when reasonably supported by
the hardware, denormal support. Some of these have performance costs,
and can be disabled.
The main difference when writing SSE code is that float operations are
really done in single-precision and double in double-precision, which is
not the case when using the x87 FPU for example, which may use up to 80
bits of precision for intermediate computations.
We do not have a kahan sum algorithm but it would be fairly easy to add.
Maybe the one from boost.accumulators could even work out of the box.