larroy commented on a change in pull request #14879: Add cpu implementation for 
Deformable Convolution
URL: https://github.com/apache/incubator-mxnet/pull/14879#discussion_r283582812
 
 

 ##########
 File path: src/operator/contrib/nn/deformable_im2col.cuh
 ##########
 @@ -75,24 +75,26 @@ namespace mxnet {
 namespace op {
 
 template <typename DType>
-__device__ DType deformable_im2col_bilinear(const DType* bottom_data, const 
int data_width,
-  const int height, const int width, DType h, DType w) {
-
+__device__ DType deformable_im2col_bilinear(const DType* bottom_data,
+                                            const int data_width,
+                                            const int height,
+                                            const int width,
+                                            DType h, DType w) {
   int h_low = floor(h);
   int w_low = floor(w);
   int h_high;
   int w_high;
   if (h_low >= height - 1) {
     h_high = h_low = height - 1;
-    h = (DType)h_low;
+    h = static_cast<DType>(h_low);
   }
   else {
     h_high = h_low + 1;
   }
 
   if (w_low >= width - 1) {
     w_high = w_low = width - 1;
-    w = (DType)w_low;
+    w = static_cast<DType>(w_low);
 
 Review comment:
   can we have overflows?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to