Skip to content

Eliminate compiler warnings & support non-real values for onnxFmu.cpp/.hpp #49

@StephanieKemna

Description

@StephanieKemna

Changes need for onnxFmu.cpp and onnxFmu.hpp:

  • There is an implicit conversion for onnxInputs from FMIReal to float, e.g. onnxFmu.cpp line 88 or line 108. The current arrays (e.g. onnxInputs_, onnxOutputs_, onnxStates_) are for float values instead of FMIReal. There are also comments in onnxFmu.cpp that it should be changed to handle non-real values.
  • Nameless structs in onnxFmu.hpp create warnings.

Example warning:

..\src\mlfmu\fmu_build\templates\onnx_fmu\onnxFmu.cpp(88,38): warning C4244: '=': conversion from 'cppfmu::FMIReal' to '_Ty', possible loss of data

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions