Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] Unifying simd header includings #44249

Closed
zanmato1984 opened this issue Sep 29, 2024 · 1 comment
Closed

[C++] Unifying simd header includings #44249

zanmato1984 opened this issue Sep 29, 2024 · 1 comment

Comments

@zanmato1984
Copy link
Collaborator

zanmato1984 commented Sep 29, 2024

Describe the enhancement requested

Some of simd-related files are including concrete system headers such as:

#if defined(ARROW_HAVE_RUNTIME_AVX2)
# include <immintrin.h>
#endif

However I see that https://github.com/apache/arrow/blob/6f64af54ea3662b7e1685b84a81429df14beace1/cpp/src/arrow/util/simd.h seems to be a centralized header to sort out all the platform-specific checks. Besides, I think it is a good place to put universal definitions - e.g. working around certain compiler bugs like what #44116 did - to be visible to all simd source files.

Therefore I think we can unify the simd header inclusion by utilizing simd.h.

Component(s)

C++

pitrou pushed a commit that referenced this issue Oct 2, 2024
### Rationale for this change

#44249

### What changes are included in this PR?

Change all the system header inclusions to `simd.h`.

Also removed some duplicated defines.

### Are these changes tested?

Existing tests should be good.

### Are there any user-facing changes?

None.

* GitHub Issue: #44249

Authored-by: Ruoxi Sun <zanmato1984@gmail.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
@pitrou pitrou added this to the 18.0.0 milestone Oct 2, 2024
@pitrou
Copy link
Member

pitrou commented Oct 2, 2024

Issue resolved by pull request 44250
#44250

@pitrou pitrou closed this as completed Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants