[Numpy-discussion] Enhancements for NumPy's FFTs

Charles R Harris charlesr.harris@gmail....
Sun Mar 15 00:00:17 CDT 2009


On Sat, Mar 14, 2009 at 10:44 PM, Sturla Molden <sturla@molden.no> wrote:

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

Yes, but MSVC uses _inline for inline.


>
> >>    #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;
>

So use a local define.


>
> 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.
>

Long is 32 bits on 64 bit windows. You need long long there. That's why
npy_intp is preferred.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090314/10550ca2/attachment.html 


More information about the Numpy-discussion mailing list