@@ -123,23 +123,27 @@ function Base.similar(bc::Broadcasted{EyeStyle}, elt::Type)
123123end
124124
125125# TODO : Define in terms of `_copyto!!` that is called on each argument.
126- function Base. copyto! (dest:: EyeKronecker , a:: Sum {<:KroneckerStyle{<:Any,EyeStyle()}} )
126+ function Base. copyto! (dest:: EyeKronecker , a:: Summed {<:KroneckerStyle{<:Any,EyeStyle()}} )
127127 dest2 = arg2 (dest)
128128 f = LinearCombination (a)
129- args = arguments (a)
129+ args = MapBroadcast . arguments (a)
130130 arg2s = arg2 .(args)
131131 dest2 .= f .(arg2s... )
132132 return dest
133133end
134- function Base. copyto! (dest:: KroneckerEye , a:: Sum{<:KroneckerStyle{<:Any,<:Any,EyeStyle()}} )
134+ function Base. copyto! (
135+ dest:: KroneckerEye , a:: Summed{<:KroneckerStyle{<:Any,<:Any,EyeStyle()}}
136+ )
135137 dest1 = arg1 (dest)
136138 f = LinearCombination (a)
137- args = arguments (a)
139+ args = MapBroadcast . arguments (a)
138140 arg1s = arg1 .(args)
139141 dest1 .= f .(arg1s... )
140142 return dest
141143end
142- function Base. copyto! (dest:: EyeEye , a:: Sum{<:KroneckerStyle{<:Any,EyeStyle(),EyeStyle()}} )
144+ function Base. copyto! (
145+ dest:: EyeEye , a:: Summed{<:KroneckerStyle{<:Any,EyeStyle(),EyeStyle()}}
146+ )
143147 return error (" Can't write in-place to `Eye ⊗ Eye`." )
144148end
145149
@@ -162,25 +166,25 @@ function Base.similar(bc::Broadcasted{<:DeltaStyle}, elt::Type)
162166end
163167
164168# TODO : Dispatch on `DeltaStyle`.
165- function Base. copyto! (dest:: DeltaKronecker , a:: Sum {<:KroneckerStyle} )
169+ function Base. copyto! (dest:: DeltaKronecker , a:: Summed {<:KroneckerStyle} )
166170 dest2 = arg2 (dest)
167171 f = LinearCombination (a)
168- args = arguments (a)
172+ args = MapBroadcast . arguments (a)
169173 arg2s = arg2 .(args)
170174 dest2 .= f .(arg2s... )
171175 return dest
172176end
173177# TODO : Dispatch on `DeltaStyle`.
174- function Base. copyto! (dest:: KroneckerDelta , a:: Sum {<:KroneckerStyle} )
178+ function Base. copyto! (dest:: KroneckerDelta , a:: Summed {<:KroneckerStyle} )
175179 dest1 = arg1 (dest)
176180 f = LinearCombination (a)
177- args = arguments (a)
181+ args = MapBroadcast . arguments (a)
178182 arg1s = arg1 .(args)
179183 dest1 .= f .(arg1s... )
180184 return dest
181185end
182186# TODO : Dispatch on `DeltaStyle`.
183- function Base. copyto! (dest:: DeltaDelta , a:: Sum {<:KroneckerStyle} )
187+ function Base. copyto! (dest:: DeltaDelta , a:: Summed {<:KroneckerStyle} )
184188 return error (" Can't write in-place to `Delta ⊗ Delta`." )
185189end
186190
0 commit comments