Is there a non-allocating division for two matrices?
For example:
A = randn(10,10); B = randn(10,10);
test(A,B) = A / B
@benchmark test($A, $B)
Output:
BenchmarkTools.Trial:
memory estimate: 2.81 KiB
allocs estimate: 7
--------------
minimum time: 9.443 μs (0.00% GC)
median time: 11.608 μs (0.00% GC)
mean time: 14.083 μs (12.47% GC)
maximum time: 17.603 ms (99.76% GC)
--------------
samples: 10000
evals/sample: 1
Unfortunately, StaticArrays
is not an option as the matrices size can have a length of up to a 100 for each dimension. I need the division to calculate the Kalman gain in the measurement update step.
I know that there is a function rdiv!
but I am struggling to decrease the amount of allocated memory. Any hint would be appreciated.