Material: lockless per-thread maps

Adds a good bunch of code but should be faster
and scalable because is lockless.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2008-10-31 17:42:25 +01:00
parent 8b57416ace
commit 899b9455d6
3 changed files with 109 additions and 86 deletions

View File

@@ -69,6 +69,12 @@ private:
};
/// Stores the endgame evaluation functions maps. Should be per thread
/// because STL is not thread safe and locks are expensive.
class EndgameFunctions;
/// The MaterialInfoTable class represents a pawn hash table. It is basically
/// just an array of MaterialInfo objects and a few methods for accessing these
/// objects. The most important method is get_material_info, which looks up a
@@ -85,6 +91,7 @@ public:
private:
unsigned size;
MaterialInfo *entries;
EndgameFunctions* funcs;
};