aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/prefetch.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/prefetch.h')
-rw-r--r--src/utils/prefetch.h39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/utils/prefetch.h b/src/utils/prefetch.h
deleted file mode 100644
index 66024e5ce..000000000
--- a/src/utils/prefetch.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-* Prefetching Operations
-* (C) 2009 Jack Lloyd
-*
-* Distributed under the terms of the Botan license
-*/
-
-#ifndef BOTAN_PREFETCH_H__
-#define BOTAN_PREFETCH_H__
-
-#include <botan/cpuid.h>
-
-namespace Botan {
-
-template<typename T>
-inline void prefetch_readonly(const T* addr, size_t length)
- {
-#if defined(__GNUG__)
- const size_t Ts_per_cache_line = CPUID::cache_line_size() / sizeof(T);
-
- 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, size_t length)
- {
-#if defined(__GNUG__)
- const size_t Ts_per_cache_line = CPUID::cache_line_size() / sizeof(T);
-
- for(size_t i = 0; i <= length; i += Ts_per_cache_line)
- __builtin_prefetch(addr + i, 1);
-#endif
- }
-
-}
-
-#endif