Skip to content
This repository was archived by the owner on Sep 27, 2021. It is now read-only.

Commit 89bc5a1

Browse files
committed
add tests for bool fix (666 tests lol)
1 parent b948354 commit 89bc5a1

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

test/runtests.jl

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,23 @@ for dev in CLArrays.devices()
1414
@test Array(y) == muladd(a, 2f0, abs.(a))
1515
###########
1616
# issue #20
17-
1817
against_base(a-> abs.(a), CLArray{Float32}, (10, 10))
18+
19+
#### bools in kernel:
20+
end
21+
@testset "bools" begin
22+
A, B = rand(Bool, 10), rand(Bool, 10)
23+
Ag, Bg = CLArray(A), CLArray(B)
24+
res = A .& B
25+
resg = Ag .& Bg
26+
@test res == Array(resg)
27+
# this version needs to have a fix in GPUArrays, since it uses T.(array)
28+
# in copy to convert to array type, but that actually convert Array{Bool} to BitArray
29+
# against_base((a, b)-> a .& b, CLArray{Bool}, (10,), (10,))
1930
end
2031
end
2132
end
2233

23-
2434
# The above is equal to:
2535
# Typ = CuArray
2636
# GPUArrays.allowslow(false)

0 commit comments

Comments
 (0)