mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 17:49:35 +00:00
apply const to prefetch parameter
closes https://github.com/official-stockfish/Stockfish/pull/5296 No functional change
This commit is contained in:
parent
d0b9411b82
commit
b0287dcb1c
2 changed files with 4 additions and 4 deletions
|
@ -415,14 +415,14 @@ void start_logger(const std::string& fname) { Logger::start(fname); }
|
||||||
|
|
||||||
#ifdef NO_PREFETCH
|
#ifdef NO_PREFETCH
|
||||||
|
|
||||||
void prefetch(void*) {}
|
void prefetch(const void*) {}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
void prefetch(void* addr) {
|
void prefetch(const void* addr) {
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
_mm_prefetch((char*) addr, _MM_HINT_T0);
|
_mm_prefetch((char const*) addr, _MM_HINT_T0);
|
||||||
#else
|
#else
|
||||||
__builtin_prefetch(addr);
|
__builtin_prefetch(addr);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -40,7 +40,7 @@ std::string compiler_info();
|
||||||
// Preloads the given address in L1/L2 cache. This is a non-blocking
|
// Preloads the given address in L1/L2 cache. This is a non-blocking
|
||||||
// function that doesn't stall the CPU waiting for data to be loaded from memory,
|
// function that doesn't stall the CPU waiting for data to be loaded from memory,
|
||||||
// which can be quite slow.
|
// which can be quite slow.
|
||||||
void prefetch(void* addr);
|
void prefetch(const void* addr);
|
||||||
|
|
||||||
void start_logger(const std::string& fname);
|
void start_logger(const std::string& fname);
|
||||||
void* std_aligned_alloc(size_t alignment, size_t size);
|
void* std_aligned_alloc(size_t alignment, size_t size);
|
||||||
|
|
Loading…
Add table
Reference in a new issue