Skip to content

Commit

Permalink
Fixed warnings in user_ov_extensions (openvinotoolkit#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov authored Sep 13, 2023
1 parent a8d103f commit 62b770c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/custom_operations/user_ie_extensions/grid_sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ bool GridSample::evaluate(ov::TensorVector& outputs, const ov::TensorVector& inp
const float* inp_row1 = (0 <= y1 && y1 < inpHeight) ? inp + y1 * inpWidth : zeros;
float* out = outData + d * channels * outPlane;
if ((x1 < 0 || inpWidth <= x1) && (x0 < 0 || inpWidth <= x0)) {
for (int c = 0; c < channels; ++c) {
for (size_t c = 0; c < channels; ++c) {
out[offset] = 0;
out += outPlane;
}
}
else if (x1 < 0 || inpWidth <= x1) {
for (int c = 0; c < channels; ++c) {
for (size_t c = 0; c < channels; ++c) {
out[offset] = inp_row0[x0] +
(input_y - y0) * (inp_row1[x0] - inp_row0[x0]) +
(input_x - x0) * (-inp_row0[x0] +
Expand All @@ -81,15 +81,15 @@ bool GridSample::evaluate(ov::TensorVector& outputs, const ov::TensorVector& inp
}
}
else if (x0 < 0 || inpWidth <= x0) {
for (int c = 0; c < channels; ++c) {
for (size_t c = 0; c < channels; ++c) {
out[offset] =
(input_x - x0) * (inp_row0[x1] + (input_y - y0) * (inp_row1[x1] - inp_row0[x1]));
out += outPlane;
inp_row0 += inpPlane;
inp_row1 += inpPlane;
}
} else {
for (int c = 0; c < channels; ++c) {
for (size_t c = 0; c < channels; ++c) {
out[offset] = inp_row0[x0] +
(input_y - y0) * (inp_row1[x0] - inp_row0[x0]) +
(input_x - x0) * (inp_row0[x1] - inp_row0[x0] +
Expand Down

0 comments on commit 62b770c

Please sign in to comment.