@@ -267,16 +267,17 @@ Base.getindex(::DummyZeros{T}, inds...) where {T} = zero(T)
267
267
A = zeros (3 ,4 ,5 );
268
268
D1 = view (A, 1 : 2 : 3 , :, :) # first dimension is discontiguous
269
269
D2 = view (A, :, 2 : 2 : 4 , :) # first dimension is contiguous
270
- @test device (A) === ArrayInterface. CPUPointer ()
271
- @test device ((1 ,2 ,3 )) === ArrayInterface. CPUIndex ()
272
- @test device (PermutedDimsArray (A,(3 ,1 ,2 ))) === ArrayInterface. CPUPointer ()
273
- @test device (view (A, 1 , :, 2 : 4 )) === ArrayInterface. CPUPointer ()
274
- @test device (view (A, 1 , :, 2 : 4 )' ) === ArrayInterface. CPUPointer ()
275
- @test device (view (A, 1 , :, [2 ,3 ,4 ])) === ArrayInterface. CPUIndex ()
276
- @test device (view (A, 1 , :, [2 ,3 ,4 ])' ) === ArrayInterface. CPUIndex ()
277
- @test device (@SArray (zeros (2 ,2 ,2 ))) === ArrayInterface. CPUIndex ()
278
- @test device (@view (@SArray (zeros (2 ,2 ,2 ))[1 ,1 : 2 ,:])) === ArrayInterface. CPUIndex ()
279
- @test device (@MArray (zeros (2 ,2 ,2 ))) === ArrayInterface. CPUPointer ()
270
+ @test @inferred (device (A)) === ArrayInterface. CPUPointer ()
271
+ @test @inferred (device ((1 ,2 ,3 ))) === ArrayInterface. CPUIndex ()
272
+ @test @inferred (device (PermutedDimsArray (A,(3 ,1 ,2 )))) === ArrayInterface. CPUPointer ()
273
+ @test @inferred (device (view (A, 1 , :, 2 : 4 ))) === ArrayInterface. CPUPointer ()
274
+ @test @inferred (device (view (A, 1 , :, 2 : 4 )' )) === ArrayInterface. CPUPointer ()
275
+ @test @inferred (device (view (PermutedDimsArray (A, (3 ,1 ,2 )), 1 , :, 2 : 4 )' )) === ArrayInterface. CPUPointer ()
276
+ @test @inferred (device (view (A, 1 , :, [2 ,3 ,4 ]))) === ArrayInterface. CPUIndex ()
277
+ @test @inferred (device (view (A, 1 , :, [2 ,3 ,4 ])' )) === ArrayInterface. CPUIndex ()
278
+ @test @inferred (device (@SArray (zeros (2 ,2 ,2 )))) === ArrayInterface. CPUIndex ()
279
+ @test @inferred (device (@view (@SArray (zeros (2 ,2 ,2 ))[1 ,1 : 2 ,:]))) === ArrayInterface. CPUIndex ()
280
+ @test @inferred (device (@MArray (zeros (2 ,2 ,2 )))) === ArrayInterface. CPUPointer ()
280
281
@test isnothing (device (" Hello, world!" ))
281
282
282
283
@test @inferred (contiguous_axis (@SArray (zeros (2 ,2 ,2 )))) === ArrayInterface. Contiguous (1 )
0 commit comments