@@ -6,22 +6,11 @@ using Static
66using Test
77
88x = @SVector [1 ,2 ,3 ]
9- @test ArrayInterface. ismutable (x) == false
10- @test ArrayInterface. ismutable (view (x, 1 : 2 )) == false
11- @test ArrayInterface. can_setindex (typeof (x)) == false
12- @test ArrayInterface. buffer (x) == x. data
139@test @inferred (ArrayInterface. device (typeof (x))) === ArrayInterface. CPUTuple ()
1410
1511x = @MVector [1 ,2 ,3 ]
16- @test ArrayInterface. ismutable (x) == true
17- @test ArrayInterface. ismutable (view (x, 1 : 2 )) == true
1812@test @inferred (ArrayInterface. device (typeof (x))) === ArrayInterface. CPUPointer ()
1913
20- A = @SMatrix (randn (5 , 5 ))
21- @test ArrayInterface. lu_instance (A) isa typeof (lu (A))
22- A = @MMatrix (randn (5 , 5 ))
23- @test ArrayInterface. lu_instance (A) isa typeof (lu (A))
24-
2514@test isone (ArrayInterface. known_first (typeof (StaticArrays. SOneTo (7 ))))
2615@test ArrayInterface. known_last (typeof (StaticArrays. SOneTo (7 ))) == 7
2716@test ArrayInterface. known_length (typeof (StaticArrays. SOneTo (7 ))) == 7
@@ -40,18 +29,6 @@ T = SizedArray{Tuple{5,4,3}}(zeros(5,4,3));
4029@test @inferred (ArrayInterface. length (A)) === StaticInt (42 )
4130@test @inferred (ArrayInterface. length (T)) === StaticInt (60 )
4231
43- x = @SMatrix rand (Float32, 2 , 2 )
44- y = @SVector rand (4 )
45- yr = ArrayInterface. restructure (x, y)
46- @test yr isa SMatrix{2 , 2 }
47- @test Base. size (yr) == (2 ,2 )
48- @test vec (yr) == vec (y)
49- z = rand (4 )
50- zr = ArrayInterface. restructure (x, z)
51- @test zr isa SMatrix{2 , 2 }
52- @test Base. size (zr) == (2 ,2 )
53- @test vec (zr) == vec (z)
54-
5532Am = @MMatrix rand (2 ,10 );
5633@test @inferred (ArrayInterface. strides (view (Am,1 ,:))) === (StaticInt (2 ),)
5734
0 commit comments