Skip to content

Commit

Permalink
Fix code format
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghaoshuang committed Oct 22, 2021
1 parent 3b70764 commit ec84ac3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions paddle/fluid/operators/grid_sampler_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static inline void clip(const platform::CPUDeviceContext& ctx,
auto extra = grid_abs - (grid_abs / double_range).floor() * double_range;
grid_slice_t.device(place) = extra.cwiseMin(double_range - extra);
if (max_val == 0) {
grid_slice_t.device(place) = grid_slice_t.constant(static_cast<T>(0));
grid_slice_t.device(place) = grid_slice_t.constant(static_cast<T>(0));
}
} else {
auto double_range = static_cast<T>((max_val + 1) * 2);
Expand Down Expand Up @@ -132,7 +132,7 @@ static inline void clipWithMask(const platform::CPUDeviceContext& ctx,
(is_neg != one_more_flip).template cast<T>());
grid_slice_t.device(place) = extra.cwiseMin(double_range - extra);
if (max_val == 0) {
grid_slice_t.device(place) = grid_slice_t.constant(static_cast<T>(0));
grid_slice_t.device(place) = grid_slice_t.constant(static_cast<T>(0));
}
} else {
auto double_range = static_cast<T>((max_val + 1) * 2);
Expand Down

1 comment on commit ec84ac3

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉

Please sign in to comment.