[Numpy-svn] r2846 - trunk/numpy/core/src
numpy-svn at scipy.org
numpy-svn at scipy.org
Wed Jul 19 11:36:15 EDT 2006
Author: oliphant
Date: 2006-07-19 10:36:12 -0500 (Wed, 19 Jul 2006)
New Revision: 2846
Modified:
trunk/numpy/core/src/arrayobject.c
Log:
Don't release GIL for casting involving extended data-types.
Modified: trunk/numpy/core/src/arrayobject.c
===================================================================
--- trunk/numpy/core/src/arrayobject.c 2006-07-19 15:24:47 UTC (rev 2845)
+++ trunk/numpy/core/src/arrayobject.c 2006-07-19 15:36:12 UTC (rev 2846)
@@ -7257,7 +7257,7 @@
memset(buffers[1], 0, N*selsize);
#if NPY_ALLOW_THREADS
- if (!in->descr->hasobject && !out->descr->hasobject) {
+ if (!PyArray_ISEXTENDED(in) && !PyArray_ISEXTENDED(out)) {
NPY_BEGIN_THREADS
}
#endif
@@ -7274,7 +7274,7 @@
PyArray_MultiIter_NEXT(multi);
}
#if NPY_ALLOW_THREADS
- if (!in->descr->hasobject && !out->descr->hasobject) {
+ if (!PyArray_ISEXTENDED(in) && !PyArray_ISEXTENDED(out)) {
NPY_END_THREADS
}
#endif
@@ -7335,13 +7335,13 @@
if (simple) {
#if NPY_ALLOW_THREADS
- if (!mp->descr->hasobject && !out->descr->hasobject) {
+ if (!PyArray_ISEXTENDED(mp) && !PyArray_ISEXTENDED(out)) {
NPY_BEGIN_THREADS }
#endif
castfunc(mp->data, out->data, mpsize, mp, out);
#if NPY_ALLOW_THREADS
- if (!mp->descr->hasobject && !out->descr->hasobject) {
+ if (!PyArray_ISEXTENDED(mp) && !PyArray_ISEXTENDED(out)) {
NPY_END_THREADS }
#endif
return 0;
More information about the Numpy-svn
mailing list