Skip to content

Single precision (float32, f32) support is missing #372

Description

@phansel

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`...

casadi/casadi#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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestrustissue related to the code Rust library

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions