|
32 | 32 | template<PyUFuncGenericFunction cpp_ufunc> |
33 | 33 | static void |
34 | 34 | wrap_legacy_cpp_ufunc(char **args, npy_intp const *dimensions, |
35 | | - ptrdiff_t const *steps, void *func) |
| 35 | + npy_intp const *steps, void *func) |
36 | 36 | { |
37 | 37 | NPY_ALLOW_C_API_DEF |
38 | 38 | try { |
@@ -86,14 +86,14 @@ copy_output(T buff[], char *out, npy_intp step_out, size_t n) |
86 | 86 | */ |
87 | 87 | template <typename T> |
88 | 88 | static void |
89 | | -fft_loop(char **args, npy_intp const *dimensions, ptrdiff_t const *steps, |
| 89 | +fft_loop(char **args, npy_intp const *dimensions, npy_intp const *steps, |
90 | 90 | void *func) |
91 | 91 | { |
92 | 92 | char *ip = args[0], *fp = args[1], *op = args[2]; |
93 | 93 | size_t n_outer = (size_t)dimensions[0]; |
94 | | - ptrdiff_t si = steps[0], sf = steps[1], so = steps[2]; |
| 94 | + npy_intp si = steps[0], sf = steps[1], so = steps[2]; |
95 | 95 | size_t nin = (size_t)dimensions[1], nout = (size_t)dimensions[2]; |
96 | | - ptrdiff_t step_in = steps[3], step_out = steps[4]; |
| 96 | + npy_intp step_in = steps[3], step_out = steps[4]; |
97 | 97 | bool direction = *((bool *)func); /* pocketfft::FORWARD or BACKWARD */ |
98 | 98 |
|
99 | 99 | assert (nout > 0); |
@@ -144,9 +144,9 @@ rfft_impl(char **args, npy_intp const *dimensions, npy_intp const *steps, |
144 | 144 | { |
145 | 145 | char *ip = args[0], *fp = args[1], *op = args[2]; |
146 | 146 | size_t n_outer = (size_t)dimensions[0]; |
147 | | - ptrdiff_t si = steps[0], sf = steps[1], so = steps[2]; |
| 147 | + npy_intp si = steps[0], sf = steps[1], so = steps[2]; |
148 | 148 | size_t nin = (size_t)dimensions[1], nout = (size_t)dimensions[2]; |
149 | | - ptrdiff_t step_in = steps[3], step_out = steps[4]; |
| 149 | + npy_intp step_in = steps[3], step_out = steps[4]; |
150 | 150 |
|
151 | 151 | assert (nout > 0 && nout == npts / 2 + 1); |
152 | 152 |
|
@@ -233,14 +233,13 @@ irfft_loop(char **args, npy_intp const *dimensions, npy_intp const *steps, void |
233 | 233 | size_t nin = (size_t)dimensions[1], nout = (size_t)dimensions[2]; |
234 | 234 | ptrdiff_t step_in = steps[3], step_out = steps[4]; |
235 | 235 |
|
236 | | - size_t npts_in = nout / 2 + 1; |
237 | | - |
238 | 236 | assert(nout > 0); |
239 | 237 |
|
240 | 238 | #ifndef POCKETFFT_NO_VECTORS |
241 | 239 | /* |
242 | 240 | * Call pocketfft directly if vectorization is possible. |
243 | 241 | */ |
| 242 | + size_t npts_in = nout / 2 + 1; |
244 | 243 | constexpr auto vlen = pocketfft::detail::VLEN<T>::val; |
245 | 244 | if (vlen > 1 && n_outer >= vlen && nin >= npts_in && sf == 0) { |
246 | 245 | std::vector<size_t> axes = { 1 }; |
|
0 commit comments