We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 924ed68 + 86b36ba commit 827371aCopy full SHA for 827371a
include/boost/compute/algorithm/detail/scan_on_gpu.hpp
@@ -108,7 +108,7 @@ class local_scan_kernel : public meta_kernel
108
// store sum for the block
109
if(exclusive){
110
*this <<
111
- "if(lid == block_size - 1){\n" <<
+ "if(lid == block_size - 1 && gid < count) {\n" <<
112
" block_sums[get_group_id(0)] = " <<
113
op(first[expr<cl_uint>("gid")], var<T>("scratch[lid]")) <<
114
";\n" <<
0 commit comments