Skip to content

Commit a094e18

Browse files
authored
Test for inplace Scan (#782)
1 parent 3f799ad commit a094e18

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/test_scan.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ for T in setdiff(MPITestTypes, [Char, Int8, UInt8])
2020

2121
B = MPI.Scan(T(rank+1), *, comm)
2222
@test B[1] == prodrank
23+
24+
# in-place
25+
C = copy(A)
26+
C = MPI.Scan!(C, *, comm)
27+
@test C isa ArrayType{T}
28+
@test C == ArrayType{T}(fill(T(prodrank), 4))
2329
end
2430

2531
MPI.Finalize()

0 commit comments

Comments
 (0)