@@ -830,12 +830,15 @@ for MT in (StridedMatrix{<:LinearAlgebra.BlasFloat},
830
830
@eval Base.:\ (m:: $MT , x:: StridedMatrix{<:Dual} ) =
831
831
_map_dual_components! ((y, x) -> ldiv! (y, m, x), (y, x, _) -> ldiv! (y, m, x), similar (x), x)
832
832
833
- @eval function Base.:* (m:: $MT , x:: StridedVector{<:Dual} )
834
- T = valtype (eltype (x))
835
- res = similar (x, (size (m, 1 ),))
836
- mul! (reinterpret (reshape, T, res), reinterpret (reshape, T, x), m' )
837
- return res
838
- end
833
+ @eval LinearAlgebra. mul! (C:: StridedVector{T} , A:: $MT , B:: StridedVector{T} ) where T <: Dual =
834
+ mul! (reinterpret (reshape, valtype (T), C), reinterpret (reshape, valtype (T), B), A' )
835
+
836
+ @eval LinearAlgebra. mul! (C:: StridedVector{T} , A:: $MT , B:: StridedVector{T} ,
837
+ α:: Union{LinearAlgebra.BlasFloat, Integer} ,
838
+ β:: Union{LinearAlgebra.BlasFloat, Integer} ) where T <: Dual =
839
+ mul! (reinterpret (reshape, valtype (T), C), reinterpret (reshape, valtype (T), B), A' , α, β)
840
+
841
+ @eval Base.:* (m:: $MT , x:: StridedVector{<:Dual} ) = mul! (similar (x, (size (m, 1 ),)), m, x)
839
842
840
843
@eval Base.:* (m:: $MT , x:: StridedMatrix{<:Dual} ) =
841
844
_map_dual_components! ((y, x) -> mul! (y, m, x), (y, x, _) -> mul! (y, m, x),
0 commit comments