Skip to content

Commit 7e180f8

Browse files
committed
ihyg
1 parent 403a8d9 commit 7e180f8

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
@@ -7,7 +7,7 @@ include(joinpath(dirname(pathof(KernelAbstractions)), "../examples/utils.jl")) #
77
function create_histogram(input)
88
histogram_output = zeros(eltype(input), maximum(input))
99
for i in input
10-
histogram_output[i] += 1
10+
histogram_output[i] += eltype(input)(1)
1111
end
1212
return histogram_output
1313
end
@@ -93,6 +93,10 @@ end
9393
linear_input = move(backend, linear_input)
9494
all_two = move(backend, all_two)
9595

96+
@show eltype(rand_input)
97+
@show eltype(linear_input)
98+
@show eltype(all_two)
99+
96100
rand_histogram = KernelAbstractions.zeros(backend, Int32, 128)
97101
linear_histogram = KernelAbstractions.zeros(backend, Int32, 1024)
98102
two_histogram = KernelAbstractions.zeros(backend, Int32, 2)

0 commit comments

Comments
 (0)