pitrou commented on code in PR #51340:
URL: https://github.com/apache/arrow/pull/51340#discussion_r4375807592


##########
cpp/src/arrow/util/dispatch_internal.h:
##########
@@ -221,6 +222,16 @@ constexpr DynamicDispatchTarget<Func> BestDispatchTarget(
 #  define ARROW_DISPATCH_TARGET_SVE512(func)
 #endif
 
+#if defined(ARROW_HAVE_RVV) || defined(ARROW_HAVE_RUNTIME_RVV)
+#  define ARROW_DISPATCH_TARGET_RVV(func)      \

Review Comment:
   I don't think that is right, we want per-vector width macros just like for 
SVE.



##########
cpp/cmake_modules/DefineOptions.cmake:
##########
@@ -171,6 +171,7 @@ takes precedence over ccache if a storage backend is 
configured" ON)
                        "SVE128" # fixed size SVE
                        "SVE256" # "
                        "SVE512" # "
+                       "RVV"

Review Comment:
   Just like SVE, we probably want RVV128 etc.



##########
cpp/cmake_modules/SetupCxxFlags.cmake:
##########
@@ -167,6 +167,16 @@ elseif(ARROW_CPU_FLAG STREQUAL "aarch64")
   if(ARROW_SIMD_LEVEL STREQUAL "DEFAULT")
     set(ARROW_SIMD_LEVEL "NEON")
   endif()
+elseif(ARROW_CPU_FLAG STREQUAL "riscv64")
+  set(ARROW_RVV_MARCH "rv64gcv")
+  check_cxx_compiler_flag("-march=${ARROW_RVV_MARCH}" CXX_SUPPORTS_RVV)
+  if(CXX_SUPPORTS_RVV AND ARROW_RUNTIME_SIMD_LEVEL MATCHES "^(RVV|MAX)$")

Review Comment:
   Just like SVE, we probably want RVV128 etc.



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