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