[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: potential problem with fftw changes
From: |
David Bateman |
Subject: |
Re: potential problem with fftw changes |
Date: |
Tue, 17 Feb 2004 10:06:26 +0100 |
User-agent: |
Mutt/1.4.1i |
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?
Cheers
David
--
David Bateman address@hidden
Motorola CRM +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax)
91193 Gif-Sur-Yvette FRANCE
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary