Skip to content

Commit 3a2b75f

Browse files
committed
Added GPU tests for ArrayPartition
1 parent 987f835 commit 3a2b75f

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

test/gpu/arraypartition_gpu.jl

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using RecursiveArrayTools, CUDA, Test
2+
CUDA.allowscalar(false)
3+
4+
5+
# Test indexing with colon
6+
a = (CUDA.zeros(5), CUDA.zeros(5))
7+
pA = ArrayPartition(a)
8+
pA[:, :]
9+
10+
# Indexing with boolean masks does not work yet
11+
mask = pA .> 0
12+
# pA[mask]
13+
14+
# Test recursive filling is done using GPU kernels and not scalar indexing
15+
RecursiveArrayTools.recursivefill!(pA, true)
16+
@test all(pA .== true)

test/runtests.jl

+1
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,6 @@ end
5454
if GROUP == "GPU"
5555
activate_gpu_env()
5656
@time @safetestset "VectorOfArray GPU" include("gpu/vectorofarray_gpu.jl")
57+
@time @safetestset "ArrayPartition GPU" include("gpu/arraypartition_gpu.jl")
5758
end
5859
end

0 commit comments

Comments
 (0)