Skip to content

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

@phansel

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions