Skip to content

Commit a6981fb

Browse files
committed
test histogram
1 parent d7f2b7f commit a6981fb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

examples/histogram.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,9 @@ hist = WgpuArray{UInt32}(zeros(UInt32, 10))
3434

3535
z = histogram(x, hist)
3636

37+
hist_cpu = zeros(UInt32, nbins)
38+
for i in (x |> collect)
39+
hist_cpu[i%nbins + 1] += 1
40+
end
3741

38-
42+
@test hist_cpu hist |> collect

0 commit comments

Comments
 (0)