summaryrefslogtreecommitdiff
path: root/numpy/fft/fftpack_litemodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/fft/fftpack_litemodule.c')
-rw-r--r--numpy/fft/fftpack_litemodule.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/numpy/fft/fftpack_litemodule.c b/numpy/fft/fftpack_litemodule.c
index 6f6a6c9f3..95da3194f 100644
--- a/numpy/fft/fftpack_litemodule.c
+++ b/numpy/fft/fftpack_litemodule.c
@@ -44,14 +44,14 @@ fftpack_cfftf(PyObject *NPY_UNUSED(self), PyObject *args)
nrepeats = PyArray_SIZE(data)/npts;
dptr = (double *)PyArray_DATA(data);
- NPY_SIGINT_ON;
Py_BEGIN_ALLOW_THREADS;
+ NPY_SIGINT_ON;
for (i = 0; i < nrepeats; i++) {
cfftf(npts, dptr, wsave);
dptr += npts*2;
}
- Py_END_ALLOW_THREADS;
NPY_SIGINT_OFF;
+ Py_END_ALLOW_THREADS;
PyArray_Free(op2, (char *)wsave);
return (PyObject *)data;
@@ -97,14 +97,14 @@ fftpack_cfftb(PyObject *NPY_UNUSED(self), PyObject *args)
nrepeats = PyArray_SIZE(data)/npts;
dptr = (double *)PyArray_DATA(data);
- NPY_SIGINT_ON;
Py_BEGIN_ALLOW_THREADS;
+ NPY_SIGINT_ON;
for (i = 0; i < nrepeats; i++) {
cfftb(npts, dptr, wsave);
dptr += npts*2;
}
- Py_END_ALLOW_THREADS;
NPY_SIGINT_OFF;
+ Py_END_ALLOW_THREADS;
PyArray_Free(op2, (char *)wsave);
return (PyObject *)data;
@@ -134,11 +134,11 @@ fftpack_cffti(PyObject *NPY_UNUSED(self), PyObject *args)
return NULL;
}
- NPY_SIGINT_ON;
Py_BEGIN_ALLOW_THREADS;
+ NPY_SIGINT_ON;
cffti(n, (double *)PyArray_DATA((PyArrayObject*)op));
- Py_END_ALLOW_THREADS;
NPY_SIGINT_OFF;
+ Py_END_ALLOW_THREADS;
return (PyObject *)op;
}
@@ -188,8 +188,8 @@ fftpack_rfftf(PyObject *NPY_UNUSED(self), PyObject *args)
dptr = (double *)PyArray_DATA(data);
- NPY_SIGINT_ON;
Py_BEGIN_ALLOW_THREADS;
+ NPY_SIGINT_ON;
for (i = 0; i < nrepeats; i++) {
memcpy((char *)(rptr+1), dptr, npts*sizeof(double));
rfftf(npts, rptr+1, wsave);
@@ -198,8 +198,8 @@ fftpack_rfftf(PyObject *NPY_UNUSED(self), PyObject *args)
rptr += rstep;
dptr += npts;
}
- Py_END_ALLOW_THREADS;
NPY_SIGINT_OFF;
+ Py_END_ALLOW_THREADS;
PyArray_Free(op2, (char *)wsave);
Py_DECREF(data);
return (PyObject *)ret;
@@ -252,8 +252,8 @@ fftpack_rfftb(PyObject *NPY_UNUSED(self), PyObject *args)
rptr = (double *)PyArray_DATA(ret);
dptr = (double *)PyArray_DATA(data);
- NPY_SIGINT_ON;
Py_BEGIN_ALLOW_THREADS;
+ NPY_SIGINT_ON;
for (i = 0; i < nrepeats; i++) {
memcpy((char *)(rptr + 1), (dptr + 2), (npts - 1)*sizeof(double));
rptr[0] = dptr[0];
@@ -261,8 +261,8 @@ fftpack_rfftb(PyObject *NPY_UNUSED(self), PyObject *args)
rptr += npts;
dptr += npts*2;
}
- Py_END_ALLOW_THREADS;
NPY_SIGINT_OFF;
+ Py_END_ALLOW_THREADS;
PyArray_Free(op2, (char *)wsave);
Py_DECREF(data);
return (PyObject *)ret;
@@ -294,11 +294,11 @@ fftpack_rffti(PyObject *NPY_UNUSED(self), PyObject *args)
if (op == NULL) {
return NULL;
}
- NPY_SIGINT_ON;
Py_BEGIN_ALLOW_THREADS;
+ NPY_SIGINT_ON;
rffti(n, (double *)PyArray_DATA((PyArrayObject*)op));
- Py_END_ALLOW_THREADS;
NPY_SIGINT_OFF;
+ Py_END_ALLOW_THREADS;
return (PyObject *)op;
}