intel / openvino-rs

Rust bindings for OpenVINO™
Apache License 2.0
84 stars 24 forks source link

Double-check size of returned blob dimensions #58

Closed abrown closed 1 year ago

abrown commented 1 year ago

As discussed here, this change adds a (perhaps overkill) safety check of the size of the dimensions array returned by the OpenVINO library. The added assertion is trying to avoid the improbable case where some future version of the OpenVINO library returns a dimensions array with size different than the one auto-generated in the bindings; see struct dimensions in openvino-sys/src/generated/types.rs.