Conversation
|
I think the PR looks good and gets rid of the ForwardDiff bug (at least for the 3 argument dot product). However, I am a bit hesitant of renaming all function dot(x::AbstractVector, A::AbstractMatrix, y::AbstractVector{<:DualNumber})
(axes(x)..., axes(y)...) == axes(A) || throw(DimensionMismatch())
T = typeof(dot(first(x), first(A), first(y)))
s = zero(T)
i₁ = first(eachindex(x))
x₁ = first(x)
@inbounds for j in eachindex(y)
yj = y[j]
temp = zero(adjoint(A[i₁,j]) * x₁)
@simd for i in eachindex(x)
temp += adjoint(A[i,j]) * x[i]
end
s += dot(temp, yj)
end
return s
end |
|
@bartvanerp Agreed, I've changed the PR to use multiple dispatch instead. Let's see if all tests are passing on CI. |
Codecov ReportBase: 61.61% // Head: 61.69% // Increases project coverage by
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## master #250 +/- ##
==========================================
+ Coverage 61.61% 61.69% +0.07%
==========================================
Files 194 195 +1
Lines 7183 7200 +17
==========================================
+ Hits 4426 4442 +16
- Misses 2757 2758 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
This PR fixes #249 . The underlying issue happens to be related to
ForwardDiff.jl. JuliaDiff/ForwardDiff.jl#622 JuliaDiff/ForwardDiff.jl#481