提交 2fb0eb64 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Use a ternary op since it seems the cuda compiler cannot resolve overloads by…

Use a ternary op since it seems the cuda compiler cannot resolve overloads by going through simple typedefs.
上级 a4f7d118
......@@ -683,7 +683,7 @@ class GpuEye(GpuKernelBase, Op):
def c_kernel_code(self):
return """
KERNEL void k(GLOBAL_MEM %(ctype)s *a, ga_size n, ga_size m) {
ga_size nb = (ga_size)min((ga_ulong)n, (ga_ulong)m);
ga_size nb = n < m ? n : m;
for (ga_size i = LID_0; i < nb; i += LDIM_0) {
a[i*m + i] = 1;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论