![]() |
Blitz Support : |
From: Todd Veldhuizen (tveldhui_at_[hidden])
Date: 2004-09-06 03:54:09
Hi Othmar, if Julian's suggestion doesn't work you might try compiling
with -DBZ_ALIGN_BLOCKS_ON_CACHELINE_BOUNDARY which forces blitz arrays to
be allocated on a 128-byte boundary (see memblock.cc).
cheers,
Todd
On Thu, 2 Sep 2004, Julian C. Cummings wrote:
> Hello Othmar,
>
> Presumably the proper data alignment can be obtained by using an appropriate
> compiler flag. You might want to look at how the fftw library and the
> fftw++ wrapper package are being compiled to see what special compiler
> options (if any) are being used to control data alignment. Using the same
> options when building your application with fftw and blitz should be all
> that is required. I believe that 8-byte alignment of doubles implies
> 16-byte alignment of complex<double> objects, since these are concrete data
> types.
>
> Regards, Julian C.
>
> Dr. Julian C. Cummings
> Staff Scientist, CACR/Caltech
> (626) 395-2543
> cummings_at_[hidden]
>
>
> > -----Original Message-----
> > From: blitz-support-bounces_at_[hidden]
> > [mailto:blitz-support-bounces_at_[hidden]] On Behalf Of Othmar Frey
> > Sent: Thursday, September 02, 2004 3:14 AM
> > To: blitz-support_at_[hidden]
> > Subject: [Blitz-support] FFTW and Blitz++, 16-byte aligned Vector
> >
> >
> > Hi.
> >
> > I am using (or rather trying to use) the fftw library in combination
> > with Blitz++.
> >
> > I've learned that the arrays of complex data passed to fftw must be
> > 16-byte aligned
> > to exploit the "Single Instruction Multiple Data" support of fftw.
> >
> > Is there a way to make a Vector<complex<double> > be 16-byte
> > aligned in
> > memory?
> >
> > Until now, I used the fftw++ wrapper class by John C. Bowman in
> > combination with his
> > Array class (http://www.math.ualberta.ca/~bowman/Array.h)
> > then created a
> > blitz::Vector
> > from preexisting memory by passing a pointer to an array of Bowman's
> > Array class.
> > But I am not that happy with this kind of "solution".
> >
> > Any suggestions?
> >
> > Best regards
> >
> > Othmar
> >
> > --
> > --------------------------------------------------------------
> > ---------
> > Othmar Frey Remote Sensing
> > Laboratories RSL
> > ofrey_at_[hidden] University of Zurich
> > http://www.geo.unizh.ch/~ofrey Winterthurerstrasse 190
> > phone +41 44 635 51 64 CH-8057 Zurich
> > fax +41 44 635 68 46 Switzerland
> > --------------------------------------------------------------
> > ---------
> >
> >
> > _______________________________________________
> > Blitz-support mailing list
> > Blitz-support_at_[hidden]
> > http://www.oonumerics.org/mailman/listinfo.cgi/blitz-support
> >
>
>
> _______________________________________________
> Blitz-support mailing list
> Blitz-support_at_[hidden]
> http://www.oonumerics.org/mailman/listinfo.cgi/blitz-support
>
-- Todd Veldhuizen / tveldhui_at_[hidden] / Chalmers