|
Boost : |
Subject: Re: [boost] [GSOC]SIMD Library
From: falcou (Joel.Falcou_at_[hidden])
Date: 2011-03-29 09:45:56
On 29/03/11 14:29, Tim Blechmann wrote:
> i think this is very important, since most frameworks only provide
vector
> functions, but are not composable.
We have a set of allocator & adaptor to turn any contiguous range into a
range processable as SIMD pack.
Currently this works without any problem :
std::vector<float, simd::allocator<float> > v(150);
std::transform( simd::begin(v), simd::end(v), lambda::_1 * 10 );
and output vectorized code. So for us it is better and more generic to
have such adaptor than force feeding some
one-size-fit-all vector class. Discussions elcome of course ;)
As for the composability, the proto layer takes care of that
> i would really appreciate if a boost.simd library would provide math
functions!
> implementing them is not really straight-forward but gives a significant
> performance gain. they could be implemented in a way ontop of the
`trivial'
> arithmetic interface, so the implementan could be reused among different
> backends.
The main question is : which ? NT2 is actually providing somethign like
250+ vectorized amth function, some rather obscure.
I think we can have some basic one and let people in the know (aka Boost
Math author) play with the basic functions to rebuilt w/e
fancy operations they need. We spend a lot of time on the trigonometrics
but i dont think we have the math background to do
for example vectorized elliptic functions or such. Hence the idea of boost
simd to *enable* such writing in a simple and generic way
instead of forcing stuff over people. Again YMMV.
Oh and, currently all these function are indeed ISA agnostic as the
algorithm is completely non affected by the ISA itself.
Altivec wins a bit more cause the inner horner polynomail benefits from
vec_madd while sse does not.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk