Skip to content

Commit

Permalink
Reduction fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed May 22, 2016
1 parent eca4cfb commit 173f3e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pyopencl/reduction.py
Expand Up @@ -231,7 +231,8 @@ def get_reduction_kernel(stage,
inf.kernel.set_scalar_arg_dtypes(
[None, np.int64]
+ get_arg_list_scalar_arg_dtypes(inf.arg_types)
+ [np.int64]*5)
+ [np.int64]*3 + [np.uint32, np.int64]
)

return inf

Expand Down
2 changes: 1 addition & 1 deletion test/test_algorithm.py
Expand Up @@ -271,7 +271,7 @@ def test_sum_without_data(ctx_factory):
reduce_expr="a+b", map_expr="i",
arguments=[])

result_dev = red(range=range(n), queue=queue).get()
result_dev = red(range=slice(n), queue=queue).get()
result_ref = n*(n-1)//2

assert result_dev == result_ref
Expand Down

0 comments on commit 173f3e0

Please sign in to comment.