Boost logo

Boost :

Subject: Re: [boost] [gsoc] boost.simd news from the front.
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-06-11 18:50:21

On 11/06/2011 18:17, David A. Greene wrote:
> Mathias Gaunard<mathias.gaunard_at_[hidden]> writes:
>> Making data parallelism simpler is the goal of NT2. And we do that by
>> removing loops and pointers entirely.
> First off, I want to apologize for sparking some emotions. That was not
> my intent. I am deeply sorry for not expressing myself well.
> NT2 sounds very interesting! Does it generate the loops given calls
> into generic code?

Basically let's say you write

table<float> a, b, c, d, e, f;

f = b + 3 * c + sum(d + e);

a table is N-dimensional container that can be statically or dynamically
sized, or tagged to specify specific layout requirements (sparse
matrices, distributed across the network, memory-mapped file, on the gpu...)

sum takes a table, and returns the sum of all its elements. Other
operations here are element-wise as you would expect.

We generate something along the lines of

float tmp = 0.f;
for(int i ....)
    tmp += d[i] + e[i];

for(int i ...)
    f[i] = b[i] + 3 * c[i] + tmp;

Except the for loops are parallelized using a collection of various
technologies, including but not limited to SIMD.
We can also generate GPU kernels from such expressions.

We are not considering submitting NT2 to Boost yet, and don't know if we
ever will.
For now we only want to push for getting the SIMD abstraction layer into

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