optimization-engine
optimization-engine copied to clipboard
single precision (float32, f32) support is missing
Is your feature request related to a problem? Please describe. optimization-engine appears to only support doubles (float64) as the native floating-point format for problem specification and code generation.
Passing any f32 arguments to OpEn results in various E0631, e.g.
... = note: expected closure signature `for<'a, 'b> fn(&'a [f64], &'b mut f64) -> _`
found closure signature `fn(&[f32], &mut f32) -> _`
note: required by a bound in `optimization_engine::Problem`...
https://github.com/casadi/casadi/discussions/4001
A comment on issue #4001 indicates it's possible to request that casadi use floats during code generation using the option "casadi_real".
Describe the solution you'd like Add some float32 support
Describe alternatives you've considered Converting all float32 problems to integer problems.