Blitz logo

Blitz Support :

From: Andrius Kurtinaitis (andrius.kurtinaitis_at_[hidden])
Date: 2004-01-27 03:39:37


Hello,

thank you very much for your notes.

> fftw3 (fftw.org) supports interlaced arrays, just use the advanced
> interface (fftw_plan_many_dft) with "dist=1" and "stride=3"
> (assuming you have 1 array of 3d-vectors).

Yes, I also noticed that I do not need the guru interface, just the
advanced. But reading the manual I did not manage to inderstand if it is
possible to transform the interlaced 2D array at once using the advanced
interface. In fact I do not need a real 2D transform. It is enough for
me to do N times 1D transform (one for every row). Currently I am doing
it three times for every component: howmany=rowCount, stride=3,
dist=3*columnCount. Is it possible to do it with one call?

I know, that was little off-topic, but the fftw has no support-list :-(
Kind regards
Andrius

Peter Lewyllie wrote:
> Hello Mr Kurtinaitis,
>
> I just read your post on the blitz-mailinglist:
>
>
>>>you should just create three separate objects of type
>>>Array<std::complex<double>,2>, one for each component.
>
>
>>I was doing just that until now. I think, it would be much more
>>convenient to use the multicomponent arrays. The only problem I have now
>>with the multicomponent arrays is the efficient FFT implementation which
>>would work with multicomponent arrays. Has anybody here one? Thanks,
>
>
> fftw3 (fftw.org) supports interlaced arrays, just use the advanced
> interface (fftw_plan_many_dft) with "dist=1" and "stride=3"
> (assuming you have 1 array of 3d-vectors).
>
> After you familiarized yourself with it: something worth mentioning
> when using fftw with blitz:
> make sure that the <fftw_complex*> pointer to the matrix data() doesn't
> change after you created your plan, operators like ">>" tend to reallocate
> the matrix data (on the other hand one can use a pointer-independent
> "guru" interface to fftw, but then a lot of optimization might be lost
> due to genericity).
>
> I'm wrestling with on another problem though:
> consider Array<TinyVector<std::complex<double>, 3>, 2>
> I want to sum the TinyVector components and assign
> to an Array<std::complex<double>, 2> using blitz::sum.
> I tried it several ways (even using indexes) blitz::sum always
> wants to sum the main Array, resulting in a TinyVector.
> Any ideas? (Currently doing it "manually": A[0]+A[1]+...)
>
> PS: Sorry for not posting this to the list, I don't really want spam at
> this address.
>
> Hope this helps,
> kind regards,
> Peter