Skip to content

Commit 1518340

Browse files
vchuravymaleadt
authored andcommitted
ok, ok these methods were needed
1 parent cde392d commit 1518340

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/mapreduce.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55

66
Base.any(A::GPUArray{Bool}) = mapreduce(identity, |, A; init = false)
77
Base.all(A::GPUArray{Bool}) = mapreduce(identity, &, A; init = true)
8-
Base.count(pred, A::GPUArray) = Int(mapreduce(pred, +, A; init = 0))
8+
9+
Base.any(f::Function, A::GPUArray) = mapreduce(f, |, A; init = false)
10+
Base.all(f::Function, A::GPUArray) = mapreduce(f, &, A; init = true)
11+
Base.count(pred::Function, A::GPUArray) = Int(mapreduce(pred, +, A; init = 0))
912

1013
Base.:(==)(A::GPUArray, B::GPUArray) = Bool(mapreduce(==, &, A, B; init = true))
1114

0 commit comments

Comments
 (0)