Boost logo

Boost :

Subject: Re: [boost] [OT?] SIMD and Auto-Vectorization (was Re: How to structurate libraries ?)
From: David A. Greene (greened_at_[hidden])
Date: 2009-01-19 14:14:02


On Monday 19 January 2009 00:50, Dean Michael Berris wrote:

> I agree, but if you're going to tackle the concurrency problem through
> a DSEL, I'd think a DSEL at a higher level than SIMD extensions would
> be more fruitful. For example, I'd think something like:
>
> vector<huge_numbers> numbers;
> // populate numbers
> async_result_stream results =
> apply(numbers, [... insert funky parallelisable lambda construction ...])
> while (results) {
> huge_number a;
> results >> a;
> cout << a << endl;
> }
>
> Would be able to spawn thread pools, launch tasks, and provide an
> interface to getting the results using futures underneath. The domain
> experts who already know C++ will be able to express their funky
> parallelisable lambda construction and just know that when they use
> the facility it will do the necessary decomposition and parallelism as
> much as it can at the library level. This I think is something that is
> feasible (although a little hard) to achieve -- and to think that the
> compiler will even be able to vectorize an inner loop in the
> decomposed lambda construction, that detail isn't even necessarily
> dealt with by the library.

Indeed, I think something like this is the right approach. Intel's Thread
Building Blocks is one attempt. I'm not saying it's the best but it's at
least instructive.

                                              -Dave


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