Boost logo

Boost :

Subject: Re: [boost] How to structurate libraries ?
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2009-01-15 12:25:41


Joel Falcou wrote:
> * Arch.SIMD : a SIMD computation library that provides a small scale
> binding to internal representation of a SIMD register on SIMD-enabled
> machine. Using Proto, a small DSEL is provided so one can write code like :
>
> vec<float> k = {5,5,5,5},r;
> r = ((2*k)/(3-k)).min();
>
> and have vec generate a proper SSEx or Altivec code.

Very interesting. If you need a motivating problem, have a look at the
DCT code in libjpeg. I thought about trying to improve this using
gcc's SIMD extensions (which I guess you'll use as the back-end of your
code on that platform, right?) but quickly decided it was too complicated.

(As to the "how to structure libraries?" question, I would prefer to
make each independent unit a separate library in its own right, even if
they are small. Bundling things up into collection-libraries will tend
to hide the contents; see for example today's example of the binary
constants feature, hidden inside Boost.Utility, and apparently
undiscovered. I suggest that this SIMD code should be its own library, Boost.SIMD.)

Phil.


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