mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 14:27:45 +00:00
remove blank line between function and it's description
- remove the blank line between the declaration of the function and it's comment, leads to better IDE support when hovering over a function to see it's description - remove the unnecessary duplication of the function name in the functions description - slightly refactored code for lsb, msb in bitboard.h There are still a few things we can be improved later on, move the description of a function where it was declared (instead of implemented) and add descriptions to functions which are behind macros ifdefs closes https://github.com/official-stockfish/Stockfish/pull/4840 No functional change
This commit is contained in:
+5
-14
@@ -148,7 +148,7 @@ class Logger {
|
||||
} // namespace
|
||||
|
||||
|
||||
// engine_info() returns the full name of the current Stockfish version.
|
||||
// Returns the full name of the current Stockfish version.
|
||||
// For local dev compiles we try to append the commit sha and commit date
|
||||
// from git if that fails only the local compilation date is set and "nogit" is specified:
|
||||
// Stockfish dev-YYYYMMDD-SHA
|
||||
@@ -157,7 +157,6 @@ class Logger {
|
||||
//
|
||||
// For releases (non-dev builds) we only include the version number:
|
||||
// Stockfish version
|
||||
|
||||
std::string engine_info(bool to_uci) {
|
||||
std::stringstream ss;
|
||||
ss << "Stockfish " << version << std::setfill('0');
|
||||
@@ -192,8 +191,7 @@ std::string engine_info(bool to_uci) {
|
||||
}
|
||||
|
||||
|
||||
// compiler_info() returns a string trying to describe the compiler we use
|
||||
|
||||
// Returns a string trying to describe the compiler we use
|
||||
std::string compiler_info() {
|
||||
|
||||
#define make_version_string(major, minor, patch) \
|
||||
@@ -397,7 +395,6 @@ void dbg_print() {
|
||||
|
||||
// Used to serialize access to std::cout to avoid multiple threads writing at
|
||||
// the same time.
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, SyncCout sc) {
|
||||
|
||||
static std::mutex m;
|
||||
@@ -416,9 +413,6 @@ std::ostream& operator<<(std::ostream& os, SyncCout sc) {
|
||||
void start_logger(const std::string& fname) { Logger::start(fname); }
|
||||
|
||||
|
||||
// prefetch() 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,
|
||||
// which can be quite slow.
|
||||
#ifdef NO_PREFETCH
|
||||
|
||||
void prefetch(void*) {}
|
||||
@@ -437,10 +431,9 @@ void prefetch(void* addr) {
|
||||
#endif
|
||||
|
||||
|
||||
// std_aligned_alloc() is our wrapper for systems where the c++17 implementation
|
||||
// Wrapper for systems where the c++17 implementation
|
||||
// does not guarantee the availability of aligned_alloc(). Memory allocated with
|
||||
// std_aligned_alloc() must be freed with std_aligned_free().
|
||||
|
||||
void* std_aligned_alloc(size_t alignment, size_t size) {
|
||||
|
||||
#if defined(POSIXALIGNEDALLOC)
|
||||
@@ -607,10 +600,9 @@ void bindThisThread(size_t) {}
|
||||
|
||||
#else
|
||||
|
||||
// best_node() retrieves logical processor information using Windows specific
|
||||
// Retrieves logical processor information using Windows specific
|
||||
// API and returns the best node id for the thread with index idx. Original
|
||||
// code from Texel by Peter Österlund.
|
||||
|
||||
static int best_node(size_t idx) {
|
||||
|
||||
int threads = 0;
|
||||
@@ -679,8 +671,7 @@ static int best_node(size_t idx) {
|
||||
}
|
||||
|
||||
|
||||
// bindThisThread() sets the group affinity of the current thread
|
||||
|
||||
// Sets the group affinity of the current thread
|
||||
void bindThisThread(size_t idx) {
|
||||
|
||||
// Use only local variables to be thread-safe
|
||||
|
||||
Reference in New Issue
Block a user