aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/prefetch.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-13 02:20:49 +0000
committerlloyd <[email protected]>2010-10-13 02:20:49 +0000
commitc00da53d958ef8c266012ae9425337143f14f46e (patch)
tree144932858569f60d1fbfe2f079638819a123accb /src/utils/prefetch.h
parentfe4119c74b5e81a354a5313e4d2efbf9a135aa81 (diff)
s/u32bit/size_t/ in utils
Diffstat (limited to 'src/utils/prefetch.h')
-rw-r--r--src/utils/prefetch.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/utils/prefetch.h b/src/utils/prefetch.h
index 4928c44a0..66024e5ce 100644
--- a/src/utils/prefetch.h
+++ b/src/utils/prefetch.h
@@ -13,23 +13,23 @@
namespace Botan {
template<typename T>
-inline void prefetch_readonly(const T* addr, u32bit length)
+inline void prefetch_readonly(const T* addr, size_t length)
{
#if defined(__GNUG__)
- const u32bit Ts_per_cache_line = CPUID::cache_line_size() / sizeof(T);
+ const size_t Ts_per_cache_line = CPUID::cache_line_size() / sizeof(T);
- for(u32bit i = 0; i <= length; i += Ts_per_cache_line)
+ for(size_t i = 0; i <= length; i += Ts_per_cache_line)
__builtin_prefetch(addr + i, 0);
#endif
}
template<typename T>
-inline void prefetch_readwrite(const T* addr, u32bit length)
+inline void prefetch_readwrite(const T* addr, size_t length)
{
#if defined(__GNUG__)
- const u32bit Ts_per_cache_line = CPUID::cache_line_size() / sizeof(T);
+ const size_t Ts_per_cache_line = CPUID::cache_line_size() / sizeof(T);
- for(u32bit i = 0; i <= length; i += Ts_per_cache_line)
+ for(size_t i = 0; i <= length; i += Ts_per_cache_line)
__builtin_prefetch(addr + i, 1);
#endif
}