@@ -1572,12 +1572,12 @@ end
1572
1572
end
1573
1573
1574
1574
module IRUtils
1575
- include (normpath ( @__DIR__ , " ./ compiler/irutils.jl" ) )
1575
+ include (" compiler/irutils.jl" )
1576
1576
end
1577
1577
1578
1578
@testset " strides for ReshapedArray" begin
1579
1579
# Type-based contiguous Check
1580
- a = vec (reinterpret (reshape,Int16,reshape (view (reinterpret (Int32,randn (10 )),2 : 11 ),5 , :)))
1580
+ a = vec (reinterpret (reshape, Int16, reshape (view (reinterpret (Int32, randn (10 )), 2 : 11 ), 5 , :)))
1581
1581
f (a) = only (strides (a));
1582
1582
@test IRUtils. fully_eliminated (f, Base. typesof (a)) && f (a) == 1
1583
1583
# General contiguous check
@@ -1624,14 +1624,14 @@ end
1624
1624
tb = reinterpret (Float64, view (a, 1 : 2 : 10 ))
1625
1625
tc = reinterpret (Float64, reshape (view (a, 1 : 3 : 10 ), 2 , 2 , 1 ))
1626
1626
# Issue #44040
1627
- @test IRUtils. fully_eliminated (Base. require_one_based_indexing, Base. typesof (ta,tc))
1628
- @test IRUtils. fully_eliminated (Base. require_one_based_indexing, Base. typesof (tc,tc))
1629
- @test IRUtils. fully_eliminated (Base. require_one_based_indexing, Base. typesof (ta,tc,tb))
1627
+ @test IRUtils. fully_eliminated (Base. require_one_based_indexing, Base. typesof (ta, tc))
1628
+ @test IRUtils. fully_eliminated (Base. require_one_based_indexing, Base. typesof (tc, tc))
1629
+ @test IRUtils. fully_eliminated (Base. require_one_based_indexing, Base. typesof (ta, tc, tb))
1630
1630
# Ranges && CartesianIndices
1631
- @test IRUtils. fully_eliminated (Base. require_one_based_indexing, Base. typesof (1 : 10 ,Base. OneTo (10 ),1.0 : 2.0 ,LinRange (1.0 ,2.0 ,2 ),1 : 2 : 10 ,CartesianIndices ((1 : 2 : 10 ,1 : 2 : 10 ))))
1631
+ @test IRUtils. fully_eliminated (Base. require_one_based_indexing, Base. typesof (1 : 10 , Base. OneTo (10 ), 1.0 : 2.0 , LinRange (1.0 , 2.0 , 2 ), 1 : 2 : 10 , CartesianIndices ((1 : 2 : 10 , 1 : 2 : 10 ))))
1632
1632
# Remind us to call `any` in `Base.has_offset_axes` once our compiler is ready.
1633
- @inline _has_offset_axes (A) = @inline any (x-> Int (first (x)):: Int != 1 , axes (A))
1633
+ @inline _has_offset_axes (A) = @inline any (x -> Int (first (x)):: Int != 1 , axes (A))
1634
1634
@inline _has_offset_axes (As... ) = @inline any (_has_offset_axes, As)
1635
- a, b = zeros (2 ,2 , 2 ), zeros (2 ,2 )
1636
- @test_broken IRUtils. fully_eliminated (_has_offset_axes, Base. typesof (a,a,b, b))
1635
+ a, b = zeros (2 , 2 , 2 ), zeros (2 , 2 )
1636
+ @test_broken IRUtils. fully_eliminated (_has_offset_axes, Base. typesof (a, a, b, b))
1637
1637
end
0 commit comments