octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: potential problem with fftw changes


From: Daniel J Sebald
Subject: Re: potential problem with fftw changes
Date: Tue, 17 Feb 2004 10:30:35 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01



David Bateman wrote:

According to John W. Eaton <address@hidden> (on 02/16/04):
In the new FFTW code, you have

 char in_align = ((int) in) & 0xF;
 char out_align = ((int) out) & 0xF;

with in and out declared as double*.  I think this will produce a
warning on Alphas and other systems where sizeof (double*) != sizeof (int).
So probably this should use long instead?  But even then, it is a bit
of a kluge.  Is there any guarantee that a pointer will fit in a long?
Is there any better way to check the alignment?

All of this is a kludge since I can't see a way of getting the Array
class to always have 16 byte alignment of its pointer *data. If I
could, all of this alignment checking code would disappear and we'd
also get SIMD accelerated FFTs on many platforms.

Given that we can't get the correct data alignment, we do need to check the
alignment for the plans. So we need the cast to int or long? Is
  char in_align = in & 0xF;
  char out_align = out & 0xF;

alright? Will it be correct for all platforms?


Good question. C is finicky that way. It's easy to get it to work on any given platform, but across all is another story. I'm not sure.

Dan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]