提交 e40ad6b7 authored 作者: Alexander Matyasko's avatar Alexander Matyasko

Remove redundant check for triu/l_kernels

上级 bb125436
...@@ -9,12 +9,10 @@ KERNEL void tril_kernel(const ga_size nthreads, const ga_size ncols, ...@@ -9,12 +9,10 @@ KERNEL void tril_kernel(const ga_size nthreads, const ga_size ncols,
index += LDIM_0 * GDIM_0) { index += LDIM_0 * GDIM_0) {
unsigned int ix = index / ncols; unsigned int ix = index / ncols;
unsigned int iy = index % ncols; unsigned int iy = index % ncols;
if (index < nthreads) {
if (ix < iy) { if (ix < iy) {
a[index] = 0.0; a[index] = 0.0;
} }
} }
}
} }
#kernel triu_kernel : size, size, *: #kernel triu_kernel : size, size, *:
...@@ -26,12 +24,10 @@ KERNEL void triu_kernel(const ga_size nthreads, const ga_size ncols, ...@@ -26,12 +24,10 @@ KERNEL void triu_kernel(const ga_size nthreads, const ga_size ncols,
index += LDIM_0 * GDIM_0) { index += LDIM_0 * GDIM_0) {
unsigned int ix = index / ncols; unsigned int ix = index / ncols;
unsigned int iy = index % ncols; unsigned int iy = index % ncols;
if (index < nthreads) {
if (ix > iy) { if (ix > iy) {
a[index] = 0.0; a[index] = 0.0;
} }
} }
}
} }
#section init_code #section init_code
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论