-
Notifications
You must be signed in to change notification settings - Fork 68
Single precision (float32, f32) support is missing #372
Copy link
Copy link
Labels
enhancementNew feature or requestNew feature or requestrustissue related to the code Rust libraryissue related to the code Rust library
Milestone
Description
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`...
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestrustissue related to the code Rust libraryissue related to the code Rust library