[python-dtcwt] 170/497: opencl: re-jib LoLo resizing to be OpenCL friendly

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 68f4e9e6b15ecf1e6bd0152de53d49e2e07e6c32
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date:   Sat Nov 9 13:49:15 2013 +0000

    opencl: re-jib LoLo resizing to be OpenCL friendly
    
    The PyOpenCL array class does not support arbitrary indexing, replace
    with a slice-based notation.
---
 dtcwt/opencl/transform2d.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dtcwt/opencl/transform2d.py b/dtcwt/opencl/transform2d.py
index 2a9f8a4..862f228 100644
--- a/dtcwt/opencl/transform2d.py
+++ b/dtcwt/opencl/transform2d.py
@@ -111,11 +111,11 @@ def dtwavexfm2(X, nlevels=3, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, include
         row_size, col_size = LoLo.shape
         if row_size % 4 != 0:
             # Extend by 2 rows if no. of rows of LoLo are not divisable by 4
-            LoLo = np.vstack((LoLo[[0],:], LoLo, LoLo[[-1],:]))
+            LoLo = np.vstack((LoLo[:1,:], LoLo, LoLo[-1:,:]))
 
         if col_size % 4 != 0:
             # Extend by 2 cols if no. of cols of LoLo are not divisable by 4
-            LoLo = np.hstack((LoLo[:,[0]], LoLo, LoLo[:,[-1]]))
+            LoLo = np.hstack((LoLo[:,:1], LoLo, LoLo[:,-1:]))
 
         # Do even Qshift filters on rows.
         Lo = axis_convolve_dfilter(LoLo,h0b,axis=0,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