sxjscience commented on a change in pull request #19015:
URL: https://github.com/apache/incubator-mxnet/pull/19015#discussion_r480277134



##########
File path: src/operator/numpy/np_nonzero_op-inl.h
##########
@@ -43,6 +43,25 @@ namespace mxnet {
 namespace op {
 
 struct NonzeroForwardKernel {
+  // this is for cpu
+  template<int ndim>
+  MSHADOW_XINLINE static void Map(index_t i,
+                                  int64_t* out,

Review comment:
       For me, I feel that it's better to use template because most of the 
codes are duplicated.




----------------------------------------------------------------
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]


Reply via email to