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

Prefetch #31

Open
nemequ opened this issue Dec 18, 2019 · 0 comments
Open

Prefetch #31

nemequ opened this issue Dec 18, 2019 · 0 comments

Comments

@nemequ
Copy link
Owner

nemequ commented Dec 18, 2019

I added a HEDLEYX_PREFETCH macro in the experiments branch.

  • __builtin_prefetch for GCC/clang/ICC
  • __pldx and __pld if ACLE is available (every ARM compiler I'm aware of except MSVC, including ARM's)
  • _mm_prefetch for SSE
  • __prefetch for VS targeting ARM, __prefetch2 on VS for ARM64
  • sun_prefetch_{read,write)_{once,many} for Oracle Developer Studio
  • __prefetch_by_load on XL C/C++
  • #pragma _CRI prefetch ... on Cray
  • #pragma prefetch on PGI

The reason it's not in Hedley right now is that some of the headers we would have to include (xmmintrin.h for SSE, arm_acle.h for ACLE… sun_prefetch.h for ODS isn't really a big deal) are pretty heavy and I'm not sure about the idea of pulling them in unconditionally for a macro I'm not even sure is all that useful.

If anyone has an opinion on including the macro in Hedley I'd be interested, especially if someone wants to do some testing on non-x86 since I have a feeling prefetching may be more important there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant