diff options
Diffstat (limited to 'src/utils/prefetch.h')
| -rw-r--r-- | src/utils/prefetch.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils/prefetch.h b/src/utils/prefetch.h index a2c41ef..30e364e 100644 --- a/src/utils/prefetch.h +++ b/src/utils/prefetch.h | |||
| @@ -1,3 +1,6 @@ | |||
| 1 | #ifndef UTILS_PREFETCH_H | ||
| 2 | #define UTILS_PREFETCH_H | ||
| 3 | |||
| 1 | #if defined(__GNUC__) || defined(__clang__) | 4 | #if defined(__GNUC__) || defined(__clang__) |
| 2 | #define prefetch(a, i) __builtin_prefetch(a+i, 0, 0) | 5 | #define prefetch(a, i) __builtin_prefetch(a+i, 0, 0) |
| 3 | #elif defined(AVX2) | 6 | #elif defined(AVX2) |
| @@ -5,3 +8,5 @@ | |||
| 5 | #else | 8 | #else |
| 6 | #define prefetch(a, i) (void)i | 9 | #define prefetch(a, i) (void)i |
| 7 | #endif | 10 | #endif |
| 11 | |||
| 12 | #endif /* UTILS_PREFETCH_H */ | ||
