Skip to content

Commit 61ea3cb

Browse files
committed
Fix fitlter after JuliaLang/julia#31929.
1 parent b51001e commit 61ea3cb

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/GPUArrays.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ using FFTW
1616

1717
using Adapt
1818

19+
# GPU interface
1920
include("abstractarray.jl")
2021
include("abstract_gpu_interface.jl")
2122
include("ondevice.jl")
@@ -32,6 +33,7 @@ include("vectors.jl")
3233
include("convolution.jl")
3334
include("random.jl")
3435

36+
# CPU implementation
3537
include("array.jl")
3638

3739
include("testsuite.jl")

src/abstractarray.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,3 +231,11 @@ function Base._reshape(A::GPUArray{T, 1}, dims::Tuple{Integer}) where T
231231
prod(dims) == n || throw(DimensionMismatch("parent has $n elements, which is incompatible with size $dims"))
232232
return unsafe_reinterpret(T, A, dims)
233233
end
234+
235+
236+
# filtering
237+
238+
# TODO: filter!
239+
240+
# revert of JuliaLang/julia#31929
241+
Base.filter(f, As::GPUArray) = As[map(f, As)::GPUArray{Bool}]

0 commit comments

Comments
 (0)