diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2026-03-01 18:09:44 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2026-03-01 18:09:44 +0100 |
| commit | 2c291aed4bb80f07e8557284d3399cf1e2a4ccb9 (patch) | |
| tree | 2c009a3ad206842b07b1cd758b8192e2154231e9 /src/utils/prefetch.h | |
| parent | dff3a040637f2985b5b5e369148a993183964096 (diff) | |
| download | nissy-core-2c291aed4bb80f07e8557284d3399cf1e2a4ccb9.tar.gz nissy-core-2c291aed4bb80f07e8557284d3399cf1e2a4ccb9.zip | |
Improve Windows build support.
- Use multithreading (works with a sufficiently recent version of
the Microsoft developer tools / C SDK).
- Detect CPU architecture and use AVX2 or NEON when appropriate.
- Automatically detect python installation path.
Diffstat (limited to '')
| -rw-r--r-- | src/utils/prefetch.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/utils/prefetch.h b/src/utils/prefetch.h index 89b14e8..a2c41ef 100644 --- a/src/utils/prefetch.h +++ b/src/utils/prefetch.h | |||
| @@ -1,15 +1,7 @@ | |||
| 1 | #if defined(AVX2) | ||
| 2 | |||
| 3 | #define prefetch(a, i) _mm_prefetch(a+i, _MM_HINT_T0) | ||
| 4 | |||
| 5 | #else | ||
| 6 | #if defined(__GNUC__) || defined(__clang__) | 1 | #if defined(__GNUC__) || defined(__clang__) |
| 7 | 2 | #define prefetch(a, i) __builtin_prefetch(a+i, 0, 0) | |
| 8 | #define prefetch(a, i) __builtin_prefetch(a+i, 0, 0) | 3 | #elif defined(AVX2) |
| 9 | 4 | #define prefetch(a, i) _mm_prefetch((char *)(a+i), _MM_HINT_T0) | |
| 10 | #else | 5 | #else |
| 11 | 6 | #define prefetch(a, i) (void)i | |
| 12 | #define prefetch(a, i) (void)i | ||
| 13 | |||
| 14 | #endif | ||
| 15 | #endif | 7 | #endif |
