[yt-svn] commit/yt: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Fri Dec 23 08:13:53 PST 2011
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/changeset/073492e57221/
changeset: 073492e57221
branch: yt
user: MatthewTurk
date: 2011-12-23 15:36:56
summary: Enable threads to operate during pixelization and colormapping
affected #: 2 files
diff -r 97e6056a14b4ac4d6f933141eb8e45c5ae45b506 -r 073492e57221de2f308cc9fa9fd7bba5705da259 yt/utilities/_amr_utils/misc_utilities.pyx
--- a/yt/utilities/_amr_utils/misc_utilities.pyx
+++ b/yt/utilities/_amr_utils/misc_utilities.pyx
@@ -45,17 +45,18 @@
cdef int i
cdef np.float64_t mi = 1e100, ma = -1e100, v
cdef int np = px.shape[0]
- for i in range(np):
- v = value[i]
- if v < mi or v > ma:
- if px[i] + pdx[i] < leftx: continue
- if px[i] - pdx[i] > rightx: continue
- if py[i] + pdy[i] < lefty: continue
- if py[i] - pdy[i] > righty: continue
- if pdx[i] < mindx or pdy[i] < mindx: continue
- if maxdx > 0 and (pdx[i] > maxdx or pdy[i] > maxdx): continue
- if v < mi: mi = v
- if v > ma: ma = v
+ with nogil:
+ for i in range(np):
+ v = value[i]
+ if v < mi or v > ma:
+ if px[i] + pdx[i] < leftx: continue
+ if px[i] - pdx[i] > rightx: continue
+ if py[i] + pdy[i] < lefty: continue
+ if py[i] - pdy[i] > righty: continue
+ if pdx[i] < mindx or pdy[i] < mindx: continue
+ if maxdx > 0 and (pdx[i] > maxdx or pdy[i] > maxdx): continue
+ if v < mi: mi = v
+ if v > ma: ma = v
return (mi, ma)
@cython.boundscheck(False)
diff -r 97e6056a14b4ac4d6f933141eb8e45c5ae45b506 -r 073492e57221de2f308cc9fa9fd7bba5705da259 yt/visualization/_MPL.c
--- a/yt/visualization/_MPL.c
+++ b/yt/visualization/_MPL.c
@@ -139,6 +139,7 @@
xiter[0] = yiter[0] = 0;
xiterv[0] = yiterv[0] = 0.0;
+ Py_BEGIN_ALLOW_THREADS
for(i=0;i<rows;i++)for(j=0;j<cols;j++)
*(npy_float64*) PyArray_GETPTR2(my_array, i, j) = 0.0;
for(p=0;p<nx;p++)
@@ -187,6 +188,7 @@
}
}
}
+ Py_END_ALLOW_THREADS
// Attatch output buffer to output buffer
https://bitbucket.org/yt_analysis/yt/changeset/75de61bbd2b9/
changeset: 75de61bbd2b9
branch: yt
user: MatthewTurk
date: 2011-12-23 17:13:46
summary: Fixing upload_image command.
affected #: 1 file
diff -r 073492e57221de2f308cc9fa9fd7bba5705da259 -r 75de61bbd2b98c71d1993f6260ef91f4dd16ff74 yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -1387,13 +1387,13 @@
print rv
class YTUploadImageCmd(YTCommand):
- args = (dict(short="file", type=str))
+ args = (dict(short="file", type=str),)
description = \
"""
Upload an image to imgur.com. Must be PNG.
"""
-
+ name = "upload_image"
def __call__(self, args):
filename = args.file
if not filename.endswith(".png"):
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list