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/10/10 18:03:25 UTC

[GitHub] sandeep-krishnamurthy commented on a change in pull request #12738: Add Psroipooling CPU implementation

sandeep-krishnamurthy commented on a change in pull request #12738: Add Psroipooling CPU implementation
URL: https://github.com/apache/incubator-mxnet/pull/12738#discussion_r224183011
 
 

 ##########
 File path: src/operator/contrib/psroi_pooling.cc
 ##########
 @@ -38,25 +38,193 @@ using std::floor;
 using std::ceil;
 
 namespace mshadow {
+
+template <typename DType>
+ inline void PSROIPoolForwardCPU(
+  const int count,
+  const DType* bottom_data,
+  const DType spatial_scale,
+  const int channels,
+  const int height, const int width,
+  const int pooled_height, const int pooled_width,
+  const DType* bottom_rois,
+  const int output_dim,
+  const int group_size,
+  DType* top_data) {
+  const int omp_threads = mxnet::engine::OpenMP::Get()->GetRecommendedOMPThreadCount();
+#pragma omp parallel for num_threads(omp_threads)
+  for (int index = 0; index < count; index++) {
+    // The output is in order (n, ctop, ph, pw)
 
 Review comment:
   Can you please add code documentation for the algorithm. That would be very helpful for future maintenance.
   

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