Skip to content

Commit

Permalink
apacheGH-40806: [C++] Correctly report asimd/neon in GetRuntimeInfo (a…
Browse files Browse the repository at this point in the history
…pache#40857)

### What changes are included in this PR?

New case to conditional in `MakeSimdLevelString` which makes
`GetRuntimeInfo` report correctly on respective CPUs. I chose to have it
report "neon". Lowercase to match other strings and "neon" instead of
"asimd" because I think that makes more sense to users. I'm not 100%
sure which is more correct.

Fixes apache#40806

### Are these changes tested?

We don't have automated tests for this. I did install the R package and,
on my M1 laptop it reports 'neon' now instead of 'none' before:

```r
> arrow_info()
...
SIMD Level          neon
Detected SIMD Level neon
```

### Are there any user-facing changes?

No.
* GitHub Issue: apache#40806
  • Loading branch information
amoeba authored and tolleybot committed May 2, 2024
1 parent 91d1bb8 commit 6038367
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cpp/src/arrow/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ std::string MakeSimdLevelString(QueryFlagFunction&& query_flag) {
return "avx";
} else if (query_flag(CpuInfo::SSE4_2)) {
return "sse4_2";
} else if (query_flag(CpuInfo::ASIMD)) {
return "neon";
} else {
return "none";
}
Expand Down

0 comments on commit 6038367

Please sign in to comment.