Skip to content

Commit

Permalink
Minor refactoring based on static analysis on the code of *ROIAlign: (p…
Browse files Browse the repository at this point in the history
…ytorch#2892)

- Remove unnecessary return.
  • Loading branch information
datumbox authored and vfdev-5 committed Dec 4, 2020
1 parent 6d2d9d8 commit 2fb53d4
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions torchvision/csrc/cpu/PSROIAlign_cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ void bilinear_interpolate_gradient(
// T val = (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4);

w1 = hy * hx, w2 = hy * lx, w3 = ly * hx, w4 = ly * lx;

return;
}

template <class T>
Expand Down
2 changes: 0 additions & 2 deletions torchvision/csrc/cpu/ROIAlign_cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,6 @@ void bilinear_interpolate_gradient(
// T val = (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4);

w1 = hy * hx, w2 = hy * lx, w3 = ly * hx, w4 = ly * lx;

return;
}

template <class T>
Expand Down
2 changes: 0 additions & 2 deletions torchvision/csrc/cuda/PSROIAlign_cuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ __device__ void bilinear_interpolate_gradient(
// T val = (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4);

w1 = hy * hx, w2 = hy * lx, w3 = ly * hx, w4 = ly * lx;

return;
}

template <typename T>
Expand Down
2 changes: 0 additions & 2 deletions torchvision/csrc/cuda/ROIAlign_cuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ __device__ void bilinear_interpolate_gradient(
// T val = (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4);

w1 = hy * hx, w2 = hy * lx, w3 = ly * hx, w4 = ly * lx;

return;
}

template <typename T>
Expand Down

0 comments on commit 2fb53d4

Please sign in to comment.