You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/05/01 05:21:31 UTC

[GitHub] eric-haibin-lin commented on a change in pull request #10550: [MXNET-320] Support elemwise_add/sub between dense and csr tensors

eric-haibin-lin commented on a change in pull request #10550: [MXNET-320] Support elemwise_add/sub between dense and csr tensors
URL: https://github.com/apache/incubator-mxnet/pull/10550#discussion_r185168226
 
 

 ##########
 File path: src/operator/tensor/elemwise_binary_op-inl.h
 ##########
 @@ -374,6 +374,82 @@ void ElemwiseBinaryOp::CsrCsrOp(mshadow::Stream<cpu> *s,
   }
 }
 
+/*!
+ * \brief Kernel for performing elemwise op between dense and csr matrix
+ * \param i            global thread id
+ * \param req          type of request
+ * \param out          output array
+ * \param dns_data     data array of dense input
+ * \param csr_data     data array of csr input
+ * \param csr_indices  indices array of csr input
+ * \param csr_indptr   indptr array of csr input
+ * \param num_rows     number of rows of both inputs
+ * \param num_cols     number of columns of both inputs
+ */
+template<typename OP>
+struct ElemwiseDnsCsrDnsKernel {
+  template<typename DType, typename IType, typename CType>
+  static void inline Map(int i, OpReqType req, DType* out, DType* dns_data, const DType* csr_data,
 
 Review comment:
   req should be templated here, too

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services