@@ -371,18 +371,23 @@ applylayout(::Type{typeof(*)}, ::DualLayout{Lay}, args...) where Lay = DualLayou
371
371
transtype (A:: MulMatrix ) = transtype (first (A. args))
372
372
373
373
# TODO : Why not all DiagonalLayout?
374
- @inline simplifiable (M:: Mul{<:DiagonalLayout{<:AbstractFillLayout}} ) = Val (true )
375
- @inline simplifiable (M:: Mul{<:DiagonalLayout{<:AbstractFillLayout},<:DiagonalLayout{<:AbstractFillLayout}} ) = Val (true )
376
- @inline simplifiable (M:: Mul{<:Any,<:DiagonalLayout{<:AbstractFillLayout}} ) = Val (true )
374
+ @inline simplifiable (:: Mul{<:DiagonalLayout{<:AbstractFillLayout}} ) = Val (true )
375
+ @inline simplifiable (:: Mul{<:DiagonalLayout{<:AbstractFillLayout},<:DiagonalLayout{<:AbstractFillLayout}} ) = Val (true )
376
+ @inline simplifiable (:: Mul{<:DiagonalLayout{<:OnesLayout},<:DiagonalLayout{<:AbstractFillLayout}} ) = Val (true )
377
+ @inline simplifiable (:: Mul{<:DiagonalLayout{<:AbstractFillLayout},<:DiagonalLayout{<:OnesLayout}} ) = Val (true )
378
+ @inline simplifiable (:: Mul{<:DiagonalLayout{<:OnesLayout}, <:DiagonalLayout{<:OnesLayout}} ) = Val (true ) # ambiguity
379
+ @inline simplifiable (:: Mul{<:Any,<:DiagonalLayout{<:AbstractFillLayout}} ) = Val (true )
380
+ @inline simplifiable (:: Mul{<:Union{AbstractStridedLayout,DualLayout{<:AbstractStridedLayout}}, <:DiagonalLayout{<:AbstractFillLayout}} ) = Val (true )
381
+ @inline simplifiable (:: Mul{<:DiagonalLayout{<:AbstractFillLayout}, <:AbstractStridedLayout} ) = Val (true )
377
382
@inline copy (M:: Mul{<:DiagonalLayout{<:AbstractFillLayout},<:LazyLayouts} ) = copy (mulreduce (M))
378
383
@inline copy (M:: Mul{<:LazyLayouts,<:DiagonalLayout{<:AbstractFillLayout}} ) = copy (mulreduce (M))
379
384
@inline copy (M:: Mul{BroadcastLayout{typeof(*)},<:DiagonalLayout{<:AbstractFillLayout}} ) = copy (mulreduce (M))
380
385
381
- @inline simplifiable (M :: Mul{<:Union{ZerosLayout,DualLayout{ZerosLayout}},<:Union{ZerosLayout,DualLayout{ZerosLayout}}} ) = Val (true )
382
- @inline simplifiable (M :: Mul{<:Union{ZerosLayout,DualLayout{ZerosLayout}}} ) = Val (true )
383
- @inline simplifiable (M :: Mul{<:Any,<:Union{ZerosLayout,DualLayout{ZerosLayout}}} ) = Val (true )
384
- @inline simplifiable (M :: Mul{<:Union{ZerosLayout,DualLayout{ZerosLayout}},<:DiagonalLayout{<:AbstractFillLayout}} ) = Val (true )
385
- @inline simplifiable (M :: Mul{<:DiagonalLayout{<:AbstractFillLayout},<:Union{ZerosLayout,DualLayout{ZerosLayout}}} ) = Val (true )
386
+ @inline simplifiable (:: Mul{<:Union{ZerosLayout,DualLayout{ZerosLayout}},<:Union{ZerosLayout,DualLayout{ZerosLayout}}} ) = Val (true )
387
+ @inline simplifiable (:: Mul{<:Union{ZerosLayout,DualLayout{ZerosLayout}}} ) = Val (true )
388
+ @inline simplifiable (:: Mul{<:Any,<:Union{ZerosLayout,DualLayout{ZerosLayout}}} ) = Val (true )
389
+ @inline simplifiable (:: Mul{<:Union{ZerosLayout,DualLayout{ZerosLayout}},<:DiagonalLayout{<:AbstractFillLayout}} ) = Val (true )
390
+ @inline simplifiable (:: Mul{<:DiagonalLayout{<:AbstractFillLayout},<:Union{ZerosLayout,DualLayout{ZerosLayout}}} ) = Val (true )
386
391
387
392
388
393
# inv
0 commit comments