[arrayfire] 229/248: Fix triangle test failures
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Nov 17 15:54:31 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch dfsg-clean
in repository arrayfire.
commit 144a2dbc5a6972572ee27efc43f68389b19e5412
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date: Tue Nov 10 16:14:23 2015 -0500
Fix triangle test failures
* Tests were failing on compute 53 for int,uint,char,uchar,short,ushort
---
src/backend/cuda/kernel/triangle.hpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/backend/cuda/kernel/triangle.hpp b/src/backend/cuda/kernel/triangle.hpp
index 374f6b1..8d335d6 100644
--- a/src/backend/cuda/kernel/triangle.hpp
+++ b/src/backend/cuda/kernel/triangle.hpp
@@ -43,6 +43,9 @@ namespace cuda
T *d_r = r.ptr;
const T *d_i = in.ptr;
+ const T one = scalar<T>(1);
+ const T zero = scalar<T>(0);
+
if(oz < r.dims[2] && ow < r.dims[3]) {
d_i = d_i + oz * in.strides[2] + ow * in.strides[3];
d_r = d_r + oz * r.strides[2] + ow * r.strides[3];
@@ -56,9 +59,10 @@ namespace cuda
bool cond = is_upper ? (oy >= ox) : (oy <= ox);
bool do_unit_diag = is_unit_diag && (ox == oy);
if(cond) {
- Yd_r[ox] = do_unit_diag ? scalar<T>(1) : Yd_i[ox];
+ // Change made because of compute 53 failing tests
+ Yd_r[ox] = do_unit_diag ? one : Yd_i[ox];
} else {
- Yd_r[ox] = scalar<T>(0);
+ Yd_r[ox] = zero;
}
}
}
--
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