Stockfish, a UCI chess playing engine derived from Glaurung 2.1
Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad
- Copyright (C) 2015-2017 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad
+ Copyright (C) 2015-2018 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad
Stockfish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Tie(streambuf* b, streambuf* l) : buf(b), logBuf(l) {}
- int sync() { return logBuf->pubsync(), buf->pubsync(); }
- int overflow(int c) { return log(buf->sputc((char)c), "<< "); }
- int underflow() { return buf->sgetc(); }
- int uflow() { return log(buf->sbumpc(), ">> "); }
+ int sync() override { return logBuf->pubsync(), buf->pubsync(); }
+ int overflow(int c) override { return log(buf->sputc((char)c), "<< "); }
+ int underflow() override { return buf->sgetc(); }
+ int uflow() override { return log(buf->sbumpc(), ">> "); }
streambuf *buf, *logBuf;
#endif
+void prefetch2(void* addr) {
+
+ prefetch(addr);
+ prefetch((uint8_t*)addr + 64);
+}
+
namespace WinProcGroup {
#ifndef _WIN32
void bindThisThread(size_t idx) {
- // If OS already scheduled us on a different group than 0 then don't overwrite
- // the choice, eventually we are one of many one-threaded processes running on
- // some Windows NUMA hardware, for instance in fishtest. To make it simple,
- // just check if running threads are below a threshold, in this case all this
- // NUMA machinery is not needed.
- if (Threads.size() < 8)
- return;
-
// Use only local variables to be thread-safe
int group = get_group(idx);