Skip to content

Commit

Permalink
Use dot(x, y) instead of adjoint(x) * y in _vecdot.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoolen committed Apr 30, 2019
1 parent fefe5f3 commit 90ffc02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/linalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ end
@inbounds return similar_type(a, typeof(Signed(a[2]*b[3])-Signed(a[3]*b[2])))(((Signed(a[2]*b[3])-Signed(a[3]*b[2]), Signed(a[3]*b[1])-Signed(a[1]*b[3]), Signed(a[1]*b[2])-Signed(a[2]*b[1]))))
end

@inline dot(a::StaticVector, b::StaticVector) = _vecdot(same_size(a, b), a, b, (x, y) -> adjoint(x) * y)
@inline dot(a::StaticVector, b::StaticVector) = _vecdot(same_size(a, b), a, b, dot)
@inline bilinear_vecdot(a::StaticArray, b::StaticArray) = _vecdot(same_size(a, b), a, b, *)

@inline function _vecdot(::Size{S}, a::StaticArray, b::StaticArray, product) where {S}
Expand Down

0 comments on commit 90ffc02

Please sign in to comment.