8 #ifndef BOTAN_PREFETCH_H__
9 #define BOTAN_PREFETCH_H__
11 #include <botan/cpuid.h>
21 for(
size_t i = 0; i <= length; i += Ts_per_cache_line)
22 __builtin_prefetch(addr + i, 0);
32 for(
size_t i = 0; i <= length; i += Ts_per_cache_line)
33 __builtin_prefetch(addr + i, 1);
void prefetch_readonly(const T *addr, size_t length)
static size_t cache_line_size()
void prefetch_readwrite(const T *addr, size_t length)