You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/07/08 16:44:04 UTC

[GitHub] [arrow] pitrou commented on a change in pull request #7607: ARROW-8996: [C++] Add AVX version for aggregate sum/mean with runtime dispatch

pitrou commented on a change in pull request #7607:
URL: https://github.com/apache/arrow/pull/7607#discussion_r451683288



##########
File path: cpp/src/arrow/compute/registry.cc
##########
@@ -115,6 +116,19 @@ static std::unique_ptr<FunctionRegistry> CreateBuiltInRegistry() {
   RegisterVectorNested(registry.get());
   RegisterVectorSort(registry.get());
 
+  // SIMD functions
+  auto cpu_info = arrow::internal::CpuInfo::GetInstance();
+#if defined(ARROW_HAVE_RUNTIME_AVX2)
+  if (cpu_info->IsSupported(arrow::internal::CpuInfo::AVX2)) {
+    RegisterScalarAggregateSumAvx2(registry.get());

Review comment:
       Does this mean the sum function gets defined twice for certain input types? I'm not sure the behaviour of overriding the previous definitions is well-defined. @wesm What do you think?




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

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