@@ -215,7 +215,7 @@ function _banded_broadcast!(dest::AbstractMatrix, f, A::AbstractMatrix{T}, ::Ban
215
215
dest
216
216
end
217
217
218
- function copyto! (dest:: AbstractArray , bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{<: AbstractMatrix}} )
218
+ function copyto! (dest:: AbstractArray , bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{AbstractMatrix}} )
219
219
(A,) = bc. args
220
220
_banded_broadcast! (dest, bc. f, A, MemoryLayout (typeof (dest)), MemoryLayout (typeof (A)))
221
221
end
@@ -362,12 +362,12 @@ function _banded_broadcast!(dest::AbstractMatrix, f, (x, src)::Tuple{Number,Abst
362
362
dest
363
363
end
364
364
365
- function copyto! (dest:: AbstractArray , bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{<: AbstractMatrix,<: Number}} )
365
+ function copyto! (dest:: AbstractArray , bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{AbstractMatrix,Number}} )
366
366
(A,x) = bc. args
367
367
_banded_broadcast! (dest, bc. f, (A, x), MemoryLayout (typeof (dest)), MemoryLayout (typeof (A)))
368
368
end
369
369
370
- function copyto! (dest:: AbstractArray , bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{<: Number,<: AbstractMatrix}} )
370
+ function copyto! (dest:: AbstractArray , bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{Number,AbstractMatrix}} )
371
371
(x,A) = bc. args
372
372
_banded_broadcast! (dest, bc. f, (x,A), MemoryLayout (typeof (dest)), MemoryLayout (typeof (A)))
373
373
end
@@ -605,11 +605,11 @@ function _right_rowvec_banded_broadcast!(dest::AbstractMatrix, f, (A,B)::Tuple{A
605
605
end
606
606
607
607
608
- copyto! (dest:: AbstractArray , bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{<: AbstractVector,<: AbstractMatrix}} ) =
608
+ copyto! (dest:: AbstractArray , bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{AbstractVector,AbstractMatrix}} ) =
609
609
_banded_broadcast! (dest, bc. f, bc. args, MemoryLayout (dest), MemoryLayout .(bc. args))
610
610
611
611
612
- copyto! (dest:: AbstractArray , bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{<: AbstractMatrix,<: AbstractVector}} ) =
612
+ copyto! (dest:: AbstractArray , bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{AbstractMatrix,AbstractVector}} ) =
613
613
_banded_broadcast! (dest, bc. f, bc. args, MemoryLayout (dest), MemoryLayout .(bc. args))
614
614
615
615
@@ -676,7 +676,7 @@ function __banded_broadcast!(dest::AbstractMatrix, f, (A,B)::Tuple{AbstractMatri
676
676
dest
677
677
end
678
678
679
- function checkzerobands (dest, f, (A,B):: Tuple{AbstractMatrix ,AbstractMatrix} )
679
+ function checkzerobands (dest, f, (A,B):: NTuple{2 ,AbstractMatrix} )
680
680
m,n = size (A)
681
681
d_l, d_u = bandwidths (dest)
682
682
A_l, A_u = bandwidths (A)
@@ -696,7 +696,7 @@ function checkzerobands(dest, f, (A,B)::Tuple{AbstractMatrix,AbstractMatrix})
696
696
end
697
697
698
698
699
- function _banded_broadcast! (dest:: AbstractMatrix , f, (A,B):: Tuple{AbstractMatrix ,AbstractMatrix} , Mdest:: BandedColumns , MAB:: NTuple{2,BandedColumns} )
699
+ function _banded_broadcast! (dest:: AbstractMatrix , f, (A,B):: NTuple{2 ,AbstractMatrix} , Mdest:: BandedColumns , MAB:: NTuple{2,BandedColumns} )
700
700
z = f (zero (eltype (A)), zero (eltype (B)))
701
701
bc = broadcasted (f, A, B)
702
702
l, u = bandwidths (bc)
@@ -769,7 +769,7 @@ function _banded_broadcast!(dest::AbstractMatrix, f, (A,B)::Tuple{AbstractMatrix
769
769
end
770
770
771
771
772
- copyto! (dest:: AbstractArray , bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{<:AbstractMatrix,<: AbstractMatrix}} ) =
772
+ copyto! (dest:: AbstractArray , bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:NTuple{2, AbstractMatrix}} ) =
773
773
_banded_broadcast! (dest, bc. f, bc. args, MemoryLayout (typeof (dest)), map (MemoryLayout,bc. args))
774
774
775
775
# override copy in case data has special broadcast
@@ -798,24 +798,24 @@ function _banded_broadcast(f, (x, src)::Tuple{Number,AbstractMatrix{T}}, ::Bande
798
798
_BandedMatrix (Bdata_new, axes (src,1 ), bandwidths (src)... )
799
799
end
800
800
801
- function copy (bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{<: AbstractMatrix}} )
801
+ function copy (bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{AbstractMatrix}} )
802
802
(A,) = bc. args
803
803
_banded_broadcast (bc. f, A, MemoryLayout (typeof (A)))
804
804
end
805
805
806
- function copy (bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{<: AbstractMatrix,<: Number}} )
806
+ function copy (bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{AbstractMatrix,Number}} )
807
807
(A,x) = bc. args
808
808
_banded_broadcast (bc. f, (A, x), MemoryLayout (typeof (A)))
809
809
end
810
810
811
811
812
- function copy (bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{<: Number,<: AbstractMatrix}} )
812
+ function copy (bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{Number,AbstractMatrix}} )
813
813
(x,A) = bc. args
814
814
_banded_broadcast (bc. f, (x,A), MemoryLayout (typeof (A)))
815
815
end
816
816
817
817
818
- function copy (bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:Tuple{<:AbstractMatrix,<: AbstractMatrix}} )
818
+ function copy (bc:: Broadcasted{BandedStyle, <:Any, <:Any, <:NTuple{2, AbstractMatrix}} )
819
819
_banded_broadcast (bc. f, bc. args, MemoryLayout .(typeof .(bc. args)))
820
820
end
821
821
@@ -1005,17 +1005,19 @@ end
1005
1005
# Should be made more general.
1006
1006
# #
1007
1007
function copyto! (dest:: AbstractArray{T} , bc:: Broadcasted {BandedStyle, <: Any , typeof (+ ),
1008
- <: Tuple {<: Broadcasted{BandedStyle,<:Any,typeof(*),<:Tuple{<:Number,<:AbstractMatrix}} ,
1009
- <: AbstractMatrix }}) where T
1008
+ <: Tuple {
1009
+ Broadcasted{BandedStyle,<: Any ,typeof (* ),<: Tuple{Number,AbstractMatrix} },
1010
+ AbstractMatrix}}) where T
1010
1011
αA,B = bc. args
1011
1012
α,A = αA. args
1012
1013
dest ≡ B || (dest .= B)
1013
1014
banded_axpy! (α, A, dest)
1014
1015
end
1015
1016
1016
1017
function similar (bc:: Broadcasted {BandedStyle, <: Any , typeof (+ ),
1017
- <: Tuple {<: Broadcasted{BandedStyle,<:Any,typeof(*),<:Tuple{<:Number,<:AbstractMatrix}} ,
1018
- <: AbstractMatrix }}, :: Type{T} ) where T
1018
+ <: Tuple {
1019
+ Broadcasted{BandedStyle,<: Any ,typeof (* ),<: Tuple{Number,AbstractMatrix} },
1020
+ AbstractMatrix}}, :: Type{T} ) where T
1019
1021
αA,B = bc. args
1020
1022
α,A = αA. args
1021
1023
n,m = size (A)
0 commit comments