[Haskell-cafe] ANN: two new packages: carray, fft

Jed Brown jed at 59A2.org
Fri Feb 15 17:21:44 EST 2008

On 15 Feb 2008, lemming at henning-thielemann.de wrote:

> On Fri, 15 Feb 2008, Jed Brown wrote:
> > On 15 Feb 2008, lemming at henning-thielemann.de wrote:
> >
> > On Thu, 14 Feb 2008, Jed Brown wrote:
> >
> > >> Hopefully these are mature enough to be generally useful.  I would
> > >> appreciate any comments regarding the interface.  The FFTW API is not
> > >> particularly nice for building a pure interface on.
> > >
> > > because FFTW stores global data (called 'plan's)
> >
> > Yes.  In the Haskell interface, the existence of these plans is hidden
> > From the user.
> With locks for threaded use?

In FFTW, planning is not thread-safe, but execution of plans is.  The
Haskell library takes a lock during planning, but releases it before
execution.  Planning can be time-consuming if you want a high quality
plan, and unfortunately this phase is single threaded.  It would be nice
if FFTW would expose slightly more of its internal interface, or take
its own lock when modifying it's cache so that planning would be
thread-safe.  Once a plan for your transform size is created (or
imported through the wisdom interface) the call to the planner will
return immediately and everything else can run in parallel.

In the Haskell interface, the default planner is 'estimate' which just
employs heuristics rather than actually computing some transforms.  If
you have imported the correct wisdom, this will still do an optimized
transform.  If not, it will be less than optimal, but there will be no
time-consuming planning phase.  If you are concerned about getting the
absolute best performance, you can use the advanced interface (which
still hides locking, memory allocation, and internals of
multi-dimensional transforms) for more control over planning.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20080215/9c28a047/attachment.bin

More information about the Haskell-Cafe mailing list