Dima Kogan <[email protected]> writes:

> I'll reply to this when a fix is ready

OK.

The issue is the alignment of the memory in the piddles. FFTW wants at
least 16 bytes of alignment, which is what we appear to get on 64-bit
platforms. On 32-bit platforms we get 8 bytes sometimes, which makes
things crash. The best thing to do, I think, is to allocate aligned
memory in PDL itself, instead of PDL::FFTW3. This is a common thing for
a client library to want, anyway, so others could benefit from this.

I'm assuming there's a very small number of places in PDL where all the
memory allocation code goes through. I think I see where this is done,
but my fixes don't appear to have an effect. Anybody know where this is?
So far I've tweaked pdl_malloc() in pdlcore.c.PL and get_malloc() in
CType.pm. Any others?

To be clear, I'm not pushing these yet. First I'd like to get them
working. Once they DO work, is there any opposition to making this
change in PDL proper? Do all of our platforms have memalign or an
equivalent?

dima

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to