Fix conversion warning in gna plugin (#18216)

This commit is contained in:
Pawel Raasz 2023-06-24 22:03:22 +02:00 committed by GitHub
parent 975616980b
commit 22aa219ab0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -442,7 +442,7 @@ inline Rank::value_type get_max_input_rank(const std::shared_ptr<ov::Node>& node
*/
inline Shape::value_type get_dim_by_axis(const Shape& shape, int64_t axis) {
if (axis < 0)
axis += shape.size();
axis += static_cast<int64_t>(shape.size());
if (axis < 0 || axis >= static_cast<int64_t>(shape.size()))
throw std::runtime_error("get_dim_by_axis invalid axis");
return shape[axis];
@ -547,7 +547,7 @@ inline bool has_2d_inputs(const ov::Output<ov::Node>& output) {
*/
inline bool is_pointless_permutation(const std::vector<int64_t>& indices) {
for (size_t i = 0; i < indices.size(); ++i) {
if (indices[i] != i)
if (indices[i] != static_cast<int64_t>(i))
return false;
}
return true;

View File

@ -571,7 +571,7 @@ inline void CNNNetworkInsertLayer(CNNLayerPtr after,
// located data
for (auto input_port_idx : CNNLayerFindInsDataIdxes(data, input)) {
if ((inDataIndex == input_port_idx) || inDataIndex == invalid_data_idx)
if ((inDataIndex == static_cast<size_t>(input_port_idx)) || inDataIndex == invalid_data_idx)
input->insData[input_port_idx] = layerToInsert->outData.front();
number_of_connections_between_after_n_before++;
}