From a37369a5d6289c2b5854509d9d95d52731f87fed Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Thu, 13 Dec 2012 18:50:43 -0500 Subject: [PATCH] Fix some terminology in elementwise. --- pyopencl/elementwise.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyopencl/elementwise.py b/pyopencl/elementwise.py index 159a594a..9f836095 100644 --- a/pyopencl/elementwise.py +++ b/pyopencl/elementwise.py @@ -47,7 +47,7 @@ def get_elwise_program(context, arguments, operation, body = r"""//CL// if (step < 0) { - for (i = start + (work_item_start + lid)*step; + for (i = start + (work_group_start + lid)*step; i > stop; i += gsize*step) { %(operation)s; @@ -55,7 +55,7 @@ def get_elwise_program(context, arguments, operation, } else { - for (i = start + (work_item_start + lid)*step; + for (i = start + (work_group_start + lid)*step; i < stop; i += gsize*step) { %(operation)s; @@ -64,7 +64,7 @@ def get_elwise_program(context, arguments, operation, """ else: body = """//CL// - for (i = work_item_start + lid; i < n; i += gsize) + for (i = work_group_start + lid; i < n; i += gsize) { %(operation)s; } @@ -77,7 +77,7 @@ def get_elwise_program(context, arguments, operation, { int lid = get_local_id(0); int gsize = get_global_size(0); - int work_item_start = get_local_size(0)*get_group_id(0); + int work_group_start = get_local_size(0)*get_group_id(0); long i; %(loop_prep)s; -- GitLab