[pypy-commit] pypy numpy-indexing-by-arrays-2: introduce a jit driver, although it's a bit pointless right now
fijal
noreply at buildbot.pypy.org
Tue Jan 17 13:32:02 CET 2012
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: numpy-indexing-by-arrays-2
Changeset: r51396:b48aeb33bb41
Date: 2012-01-17 14:31 +0200
http://bitbucket.org/pypy/pypy/changeset/b48aeb33bb41/
Log: introduce a jit driver, although it's a bit pointless right now
diff --git a/pypy/module/micronumpy/interp_numarray.py b/pypy/module/micronumpy/interp_numarray.py
--- a/pypy/module/micronumpy/interp_numarray.py
+++ b/pypy/module/micronumpy/interp_numarray.py
@@ -52,6 +52,12 @@
reds=['concr', 'argi', 'ri', 'frame', 'v', 'res', 'self'],
name='numpy_filter',
)
+filter_set_driver = jit.JitDriver(
+ greens=['shapelen', 'sig'],
+ virtualizables=['frame'],
+ reds=['idx', 'idxi', 'frame', 'arr'],
+ name='numpy_filterset',
+)
def _find_shape_and_elems(space, w_iterable):
shape = [space.len_w(w_iterable)]
@@ -544,6 +550,9 @@
frame = sig.create_frame(arr)
idxi = idx.create_iter()
while not frame.done():
+ filter_set_driver.jit_merge_point(idx=idx, idxi=idxi, sig=sig,
+ frame=frame, arr=arr,
+ shapelen=shapelen)
if idx.dtype.getitem_bool(idx.storage, idxi.offset):
sig.eval(frame, arr)
frame.next_from_second(1)
More information about the pypy-commit
mailing list