Boost logo

Boost :

Subject: Re: [boost] [GSOC]SIMD Library
From: Domagoj Saric (domagoj.saric_at_[hidden])
Date: 2011-03-29 10:14:44


"Mathias Gaunard" <mathias.gaunard_at_[hidden]> wrote in message
news:imsimd$mei$1_at_dough.gmane.org...
> On 29/03/2011 13:56, Domagoj Saric wrote:
> Boost.SIMD does not have first-class support for 1D vectors.
> It only works with SIMD registers. It's up to you to allocate your memory
> (which you can do using the SIMD allocator), load/store SIMD registers
> from/to it (which you can do using the SIMD iterator adaptor), run or
> parallelize loops, etc.

That's great too...actually I'd rather have it this way than only the higher
level vector functions as usually found in other libraries (especially if
you cannot not have them, such as with the OS X Accelerate framework, plus
it can prove to be more future proof...i.e. Apple updates it for new
architectures and targets like iPad2, Intel AVX...)...
OTOH also providing a higher level interface (as Boost.Range and/or
Boost.Math algorithm overloads or something similar) top of the lower level
one afterwards would be great...

> There aren't many solutions to implement most basic functions, so I don't
> really see the point of providing a backend that calls some other library
> instead of calling the couple of native instructions supported by the
> processor.

While staying at the lowest possible level yes, I agree. As soon as we
depart from the 'metal' however, the amount of boilerplate increases and
(mentioned) libraries can become useful...
I'm not saying this is critical rather nice to have...

> As for MKL, it provides fast implementations of math functions. We are not
> certain yet whether those will be part of Boost.SIMD or not --
> indeed, maybe Boost.SIMD should only contain 'trivial' arithmetic and
> bitwise functions.

Hmm...well yes, if it is going to be called Boost.SIMD than it probably
should be restricted to the low 'hardware abstraction' level...The higher
level vector and math functions could than be provided through/by
Boost.Range, Boost.Math, Boost.uBLAS...
I would certainly like to have both layers in Boost...

> In any case, our implementations of the trigonometric and exponential math
> functions are faster and more accurate than those of MKL.
> There could be, however, wrappers on top of MKL in NT2. We already have
> that for several other libraries.

Could you perhaps help me with a few pointers on how to use/test NT2 (e.g.
performing sincos on a 1D vector)?
I checked out the latest revision from SVN, and downloaded the documentation
for the official version 2 but it is in French which I unfortunately do not
understand. The examples for version 2 that contain the cos() function also
do not work as they mention a nonexistent eve.hpp header...

ps. does NT2 support SSE1 for single precision floats? Unfortunately this is
a must for me (and probably for a lot of people as there are quite a few
Athlon XP's around) so I cannot use SSE2+ only libraries like Eigen...

pps. if you are considering MKL you should probably also consider free
alternatives like AMD's ACML and Apple's Accelerate framework...

ppps. this project is great news...thanks for the doing all the work guys!
;)

-- 
"What Huxley teaches is that in the age of advanced technology, spiritual
devastation is more likely to come from an enemy with a smiling face than
from one whose countenance exudes suspicion and hate."
Neil Postman 

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk