Skip to content

Commit b07c670

Browse files
committed
inplace linear combination
1 parent a06d277 commit b07c670

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/linearcombination.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,6 @@ end
157157
function Base.:(*)(A::LinearCombination{<:Any,<:Tuple{Vararg{OOPFunctionMap}}}, x::AbstractVector)
158158
mapreduce(L -> L * x, (x, y) -> x .+= y, A.maps)
159159
end
160+
161+
_unsafe_mul!(y, A::LinearCombination{<:Any,<:Tuple{Vararg{OOPFunctionMap}}}, x::AbstractVector) =
162+
copyto!(y, A*x)

0 commit comments

Comments
 (0)