Skip to content

Commit d8ccbe7

Browse files
authored
Minor refactoring based on static analysis on the code of *ROIAlign: (#2892)
- Remove unnecessary return.
1 parent 2e23e47 commit d8ccbe7

File tree

4 files changed

+0
-8
lines changed

4 files changed

+0
-8
lines changed

torchvision/csrc/cpu/PSROIAlign_cpu.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,6 @@ void bilinear_interpolate_gradient(
194194
// T val = (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4);
195195

196196
w1 = hy * hx, w2 = hy * lx, w3 = ly * hx, w4 = ly * lx;
197-
198-
return;
199197
}
200198

201199
template <class T>

torchvision/csrc/cpu/ROIAlign_cpu.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,6 @@ void bilinear_interpolate_gradient(
269269
// T val = (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4);
270270

271271
w1 = hy * hx, w2 = hy * lx, w3 = ly * hx, w4 = ly * lx;
272-
273-
return;
274272
}
275273

276274
template <class T>

torchvision/csrc/cuda/PSROIAlign_cuda.cu

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,6 @@ __device__ void bilinear_interpolate_gradient(
192192
// T val = (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4);
193193

194194
w1 = hy * hx, w2 = hy * lx, w3 = ly * hx, w4 = ly * lx;
195-
196-
return;
197195
}
198196

199197
template <typename T>

torchvision/csrc/cuda/ROIAlign_cuda.cu

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,6 @@ __device__ void bilinear_interpolate_gradient(
194194
// T val = (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4);
195195

196196
w1 = hy * hx, w2 = hy * lx, w3 = ly * hx, w4 = ly * lx;
197-
198-
return;
199197
}
200198

201199
template <typename T>

0 commit comments

Comments
 (0)