|
647 | 647 | @test @inferred(ArrayInterface.dense_dims(view(Sr2,:,2))) === (True(),)
|
648 | 648 | @test @inferred(ArrayInterface.dense_dims(view(Sr2,:,2:3))) === (True(),True())
|
649 | 649 | @test @inferred(ArrayInterface.dense_dims(view(Sr2,2:3,:))) === (True(),False())
|
| 650 | + |
| 651 | + Ar2c = reinterpret(reshape, Complex{Float64}, view(rand(2, 5, 7), :, 2:4, 3:5)); |
| 652 | + @test @inferred(ArrayInterface.strides(Ar2c)) === (StaticInt(1), 5) |
| 653 | + Ar2c_static = reinterpret(reshape, Complex{Float64}, view(@MArray(rand(2, 5, 7)), :, 2:4, 3:5)); |
| 654 | + @test @inferred(ArrayInterface.strides(Ar2c_static)) === (StaticInt(1), StaticInt(5)) |
| 655 | + |
| 656 | + Ac2r = reinterpret(reshape, Float64, view(rand(ComplexF64, 5, 7), 2:4, 3:6)); |
| 657 | + @test @inferred(ArrayInterface.strides(Ac2r)) === (StaticInt(1), StaticInt(2), 10) |
| 658 | + Ac2r_static = reinterpret(reshape, Float64, view(@MMatrix(rand(ComplexF64, 5, 7)), 2:4, 3:6)); |
| 659 | + @test @inferred(ArrayInterface.strides(Ac2r_static)) === (StaticInt(1), StaticInt(2), StaticInt(10)) |
| 660 | + |
| 661 | + Ac2t = reinterpret(reshape, Tuple{Float64,Float64}, view(rand(ComplexF64, 5, 7), 2:4, 3:6)); |
| 662 | + @test @inferred(ArrayInterface.strides(Ac2t)) === (StaticInt(1), 5) |
| 663 | + Ac2t_static = reinterpret(reshape, Tuple{Float64,Float64}, view(@MMatrix(rand(ComplexF64, 5, 7)), 2:4, 3:6)); |
| 664 | + @test @inferred(ArrayInterface.strides(Ac2t_static)) === (StaticInt(1), StaticInt(5)) |
| 665 | + |
650 | 666 | end
|
651 | 667 | end
|
652 | 668 |
|
|
0 commit comments