kou commented on a change in pull request #11876:
URL: https://github.com/apache/arrow/pull/11876#discussion_r767079743



##########
File path: cpp/src/arrow/compute/exec/CMakeLists.txt
##########
@@ -32,6 +32,19 @@ add_arrow_compute_test(util_test PREFIX "arrow-compute")
 
 add_arrow_benchmark(expression_benchmark PREFIX "arrow-compute")
 
+find_package(OpenMP)
+if(OpenMP_CXX_FOUND)
+  add_arrow_benchmark(hash_join_benchmark
+                      PREFIX
+                      "arrow-compute"
+                      EXTRA_LINK_LIBS
+                      OpenMP::OpenMP_CXX)
+  if(MSVC)
+    target_compile_options(arrow-compute-hash-join-benchmark
+                           PRIVATE "-openmp:experimental -openmp:llvm")
+  endif()
+endif()
+

Review comment:
       You're thinking like the following implementation, right?
   
   ```cmake
   if(ARROW_BUILD_OPENMP_BENCHMARKS)
     find_package(OpenMP REQUIRED)
     add_arrow_benchmark(hash_join_benchmark
                         PREFIX
                         "arrow-compute"
                         EXTRA_LINK_LIBS
                         OpenMP::OpenMP_CXX)
     if(MSVC)
       target_compile_options(arrow-compute-hash-join-benchmark
                              PRIVATE "-openmp:experimental -openmp:llvm")
     endif()
   endif()
   ```
   
   I think that it's a good idea. Developers can disable OpenMP related 
(heavy?) benchmarks explicitly with this approach.
   




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to