Boost logo

Boost :

Subject: Re: [boost] Boost SIMD beta release
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2012-12-20 05:05:03

On 20/12/2012 10:59, Tim Blechmann wrote:
> hi,
>> * We welcome comments, questions and random requests/rants/bug reports
>> as to polish the library before actual submission to the boost
>> review. Such comments
>> can be sent there, on our nt2-dev Google groups or in the nt2 issue
>> tracker.
> in a way it is hard to comment on the library, as the documentation does
> not really exist, still some questions/thoughts, maybe i've missed
> something in the slides/paper ... didn't have a look at the code, yet:

We're working hard ot get a doc rolling ASAP

> * does boost.simd support horizontal operations (fold/reduce/accumulate)?

The reduction toolbox provides vector horizontal operation.
You can then run std::accumulate with a proper functor and have
the simd_iterator kicks in and vectorize your large data reduction.

> * is it possible to define simd kernels for both packs and scalars e.g.
> to make use of branches in the scalar implementation used in
> preroll/postroll of unrolled loops?

All operations on pack are also defined on scalar so if you write a
polymorphic template functor, it will work on both. There is a simple
example of
this in the paper.

> * does boost.simd have any facility to do loop unrolling? in my library,
> i'm unrolling loops by the size of a cache line and try to avoid
> read-after-write hazards by pre-loading data.

We have a primitive one but it is not yet fully promoted as part of the API.

> * how does boost.simd deal with stack alignment? on win32 i ended up
> compiling with -mstackrealign, though it is said not to be the best
> solution (didn't have a closer look)

Good question, IIRC we tried ot satisfy the ABI requirement of passing
SIMD type
in structures over to functions properly by either usign references at
the upper level
and then work with register type as soon as possible. This is still
suboptimal in some
cases. Maybe Mathias can give you more insight on this subject.

Boost list run by bdawes at, gregod at, cpdaniel at, john at