[arrayfire] 252/284: BUGFIX: incorrect index for 3rd dimension in select / replace
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Sun Feb 7 18:59:38 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/experimental
in repository arrayfire.
commit 96041b5f2103e0025cf378d11a184bba63cf1681
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date: Thu Jan 28 17:09:20 2016 -0500
BUGFIX: incorrect index for 3rd dimension in select / replace
Affects both CUDA and OpenCL abckends
---
src/backend/cuda/kernel/select.hpp | 4 ++--
src/backend/opencl/kernel/select.cl | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/backend/cuda/kernel/select.hpp b/src/backend/cuda/kernel/select.hpp
index ab5bf2d..ea242e4 100644
--- a/src/backend/cuda/kernel/select.hpp
+++ b/src/backend/cuda/kernel/select.hpp
@@ -41,7 +41,7 @@ namespace cuda
const int idw = blockIdx.y / blk_y;
const int blockIdx_x = blockIdx.x - idz * blk_x;
- const int blockIdx_y = blockIdx.y - idz * blk_y;
+ const int blockIdx_y = blockIdx.y - idw * blk_y;
const int idx = blockIdx_x * blockDim.x + threadIdx.x;
const int idy = blockIdx_y * blockDim.y + threadIdx.y;
@@ -110,7 +110,7 @@ namespace cuda
const int idw = blockIdx.y / blk_y;
const int blockIdx_x = blockIdx.x - idz * blk_x;
- const int blockIdx_y = blockIdx.y - idz * blk_y;
+ const int blockIdx_y = blockIdx.y - idw * blk_y;
const int idx = blockIdx_x * blockDim.x + threadIdx.x;
const int idy = blockIdx_y * blockDim.y + threadIdx.y;
diff --git a/src/backend/opencl/kernel/select.cl b/src/backend/opencl/kernel/select.cl
index 94a3603..03248be 100644
--- a/src/backend/opencl/kernel/select.cl
+++ b/src/backend/opencl/kernel/select.cl
@@ -41,7 +41,7 @@ void select_kernel(__global T *optr, KParam oinfo,
const int idw = get_group_id(1) / groups_1;
const int group_id_0 = get_group_id(0) - idz * groups_0;
- const int group_id_1 = get_group_id(1) - idz * groups_1;
+ const int group_id_1 = get_group_id(1) - idw * groups_1;
const int idx = group_id_0 * get_local_size(0) + get_local_id(0);
const int idy = group_id_1 * get_local_size(1) + get_local_id(1);
@@ -80,7 +80,7 @@ void select_scalar_kernel(__global T *optr, KParam oinfo,
const int idw = get_group_id(1) / groups_1;
const int group_id_0 = get_group_id(0) - idz * groups_0;
- const int group_id_1 = get_group_id(1) - idz * groups_1;
+ const int group_id_1 = get_group_id(1) - idw * groups_1;
const int idx = group_id_0 * get_local_size(0) + get_local_id(0);
const int idy = group_id_1 * get_local_size(1) + get_local_id(1);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git
More information about the debian-science-commits
mailing list