cjolivier01 closed pull request #8316: Fix unused type warning
URL: https://github.com/apache/incubator-mxnet/pull/8316
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/operator/tensor/init_op.h b/src/operator/tensor/init_op.h
index e08a682d94..97bda906c6 100644
--- a/src/operator/tensor/init_op.h
+++ b/src/operator/tensor/init_op.h
@@ -325,11 +325,9 @@ inline bool RangeShape(const nnvm::NodeAttrs& attrs,
       << "Invalid range (start, stop, step)= "
       << "(" << param.start << "," << param.stop.value() << "," << param.step 
<< ")";
   }
-  MSHADOW_TYPE_SWITCH(param.dtype, DType, {
-    double out_size = std::ceil((param.stop.value() - param.start) / 
param.step)
-                      * param.repeat;
-    SHAPE_ASSIGN_CHECK(*out_attrs, 0, 
TShape({static_cast<nnvm::dim_t>(out_size)}));
-  });
+  const double out_size = std::ceil((param.stop.value() - param.start) / 
param.step)
+                          * param.repeat;
+  SHAPE_ASSIGN_CHECK(*out_attrs, 0, 
TShape({static_cast<nnvm::dim_t>(out_size)}));
   return true;
 }
 


 

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


With regards,
Apache Git Services

Reply via email to