[Numpy-discussion] Enhancements for NumPy's FFTs

Sturla Molden sturla@molden...
Sat Mar 14 23:44:04 CDT 2009


>
> I think MSVC uses _inline

No, MSVC uses a double underscore. That is, __restrict for variable names
and __declspec(restrict) for function return values.


>>    #if (__STDC_VERSION__ >= 199901L)
>>        #undef RESTRICT
>>        #undef INLINE
>>        #define RESTRICT restrict
>>        #define INLINE inline
>>    #endif
>> #endif
>>
>
> What does this last bit do? We implicitly assume that ieee floating point
> is
> available.

It uses the restrict keyword in C99. The last test will pass on any C99
compiler.


>> #ifdef DOUBLE
>>    typedef double Treal
>> #else
>>    typedef float Treal
>> #endif
>> typedef Treal *RESTRICT Vreal /* V as in "vector" */
>>
>>
> I'm not sure about the names. I would prefer to keep the declarations
> along
> the lines of
>
> double * NPY_RESTRICT ptmp;

Yes, but then I would have to go in and edit all function bodies in
fftpack.c as well.  fftpack.c currently uses "Treal array[]" as naming
convention, so I just changed that to "Vreal array".

I changed all ints to long for 64 bit support.

Well, it compiles and runs ok on my computer now. I'll open a ticket for
the FFT. I'll attach the C files to the ticket.

Sturla Molden




More information about the Numpy-discussion mailing list