Skip to content

Commit 4511057

Browse files
authored
Merge pull request #189 from JuliaControl/debug_KF
debug: remove `.data` in `KalmanFilter` matrix products
2 parents 127ed86 + f60fcc9 commit 4511057

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/estimator/kalman.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ function correct_estimate_kf!(estim::Union{KalmanFilter, ExtendedKalmanFilter},
12101210
x̂0, P̂ = estim.x̂0, estim.
12111211
# in-place operations to reduce allocations:
12121212
P̂_Ĉmᵀ =
1213-
mul!(P̂_Ĉmᵀ, P̂.data, Ĉm') # the ".data" weirdly removes a type instability in mul!
1213+
mul!(P̂_Ĉmᵀ, P̂, Ĉm')
12141214
= estim.buffer.
12151215
mul!(M̂, Ĉm, P̂_Ĉmᵀ)
12161216
.+=
@@ -1252,7 +1252,7 @@ function predict_estimate_kf!(estim::Union{KalmanFilter, ExtendedKalmanFilter},
12521252
# in-place operations to reduce allocations:
12531253
f̂!(x̂0next, û0, k0, estim, estim.model, x̂0corr, u0, d0)
12541254
P̂corr_Âᵀ = estim.buffer.
1255-
mul!(P̂corr_Âᵀ, P̂corr.data, Â') # the ".data" weirdly removes a type instability in mul!
1255+
mul!(P̂corr_Âᵀ, P̂corr, Â')
12561256
Â_P̂corr_Âᵀ = estim.buffer.
12571257
mul!(Â_P̂corr_Âᵀ, Â, P̂corr_Âᵀ)
12581258
P̂next = estim.buffer.

0 commit comments

Comments
 (0)