WillAyd commented on code in PR #46173:
URL: https://github.com/apache/arrow/pull/46173#discussion_r2055964634


##########
cpp/src/arrow/meson.build:
##########
@@ -227,6 +230,26 @@ arrow_testing_srcs = [
     'testing/util.cc',
 ]
 
+simd = import('unstable-simd')
+rval = simd.check(
+    'simd-modules',
+    avx2: 'util/bpacking_avx2.cc',
+    # TODO: Meson has not yet implemented avx512
+    #avx512: 'util/bpacking_avx512.cc',
+    neon: 'util/bpacking_neon.cc',
+    compiler: cpp_compiler,
+    include_directories: arrow_includes,
+)
+simd_libraries = rval[0]
+simd_configuration = rval[1]
+arrow_simd_defines = []
+
+if simd_configuration.has('HAVE_AVX2')
+    arrow_simd_defines += ['-DARROW_HAVE_RUNTIME_AVX2']

Review Comment:
   Ah my mistake - I didn't realize we had both `ARROW_HAVE_AVX2` and 
`ARROW_HAVE_RUNTIME_AVX2`; I am pretty new to SIMD so that distinction isn't 
yet clear to me, but yes we can go ahead and add.
   
   It's also worth noting that the Meson SIMD check adds defines like` 
HAVE_AVX2` through this object when that instruction set is supported. Not 
something we would change the mainline code for today, but in the long run that 
might help us simplify the macro usage



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to