[python-dtcwt] 168/497: opencl: remove some un-necessary host<->device copies

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:06:01 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/sid
in repository python-dtcwt.

commit 4953c110258e1b774e7e0655f4ad2072f577b0e4
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date:   Sat Nov 9 13:46:02 2013 +0000

    opencl: remove some un-necessary host<->device copies
    
    Now at x2.92 speed
---
 dtcwt/opencl/transform2d.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dtcwt/opencl/transform2d.py b/dtcwt/opencl/transform2d.py
index 5c1b359..2a9f8a4 100644
--- a/dtcwt/opencl/transform2d.py
+++ b/dtcwt/opencl/transform2d.py
@@ -94,8 +94,8 @@ def dtwavexfm2(X, nlevels=3, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, include
 
     if nlevels >= 1:
         # Do odd top-level filters on cols.
-        Lo = to_array(axis_convolve(X,h0o,axis=0,queue=queue))
-        Hi = to_array(axis_convolve(X,h1o,axis=0,queue=queue))
+        Lo = axis_convolve(X,h0o,axis=0,queue=queue)
+        Hi = axis_convolve(X,h1o,axis=0,queue=queue)
 
         # Do odd top-level filters on rows.
         LoLo = to_array(axis_convolve(Lo,h0o,axis=1))
@@ -118,8 +118,8 @@ def dtwavexfm2(X, nlevels=3, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, include
             LoLo = np.hstack((LoLo[:,[0]], LoLo, LoLo[:,[-1]]))
 
         # Do even Qshift filters on rows.
-        Lo = to_array(axis_convolve_dfilter(LoLo,h0b,axis=0,queue=queue))
-        Hi = to_array(axis_convolve_dfilter(LoLo,h1b,axis=0,queue=queue))
+        Lo = axis_convolve_dfilter(LoLo,h0b,axis=0,queue=queue)
+        Hi = axis_convolve_dfilter(LoLo,h1b,axis=0,queue=queue)
 
         # Do even Qshift filters on columns.
         LoLo = to_array(axis_convolve_dfilter(Lo,h0b,axis=1,queue=queue))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-dtcwt.git



More information about the debian-science-commits mailing list