Closed aloysiousBenoy closed 1 year ago
Hey @aloysiousBenoy , I'm pretty sure that line will compile if you modify it like so:
k_process_noise = k_intermediate * 10.0f;
The problem is that you're using an integer datatype for the multiplier whereas BLA::Matrix
s expect a multiplier of the same type as their elements, which by default is float.
Hope that helps! Let me know if you have any more trouble
That solved the issue !! Thanks a lot ! Is this documented/ mentioned somewhere or is this a very obvious thing?
No problem! I'm glad that did the trick.
It's not super obvious and it's also not explicitly documented anywhere. That said, pretty much every function in this library has a unit test that demonstrates how it works so they might be a useful reference if you run into any more compiler errors. In this case the corresponding test is here: https://github.com/tomstewart89/BasicLinearAlgebra/blob/782afcee029544fe5b1dc25265ab8169ab2d0db4/test/test_arithmetic.cpp#L106
Hope that helps! Good luck with your project!
I guess my recent opened issue has to do with this as well. Somehow, v3.7.0 may have been doing implicit type casting which I guess is dangerous? Wouldn't it default to the type of the left-hand-side being assigned to (i.e. casting to higher resolution should be allowed)?
In our case, it seems that casting int -> float should be permissible (and indeed it is in v 3.7.0).
For some reason scalar multiplication is giving me error When I add in the following line of code the code fails to compile
I get the following error