io-chess
UCI chess engine
Loading...
Searching...
No Matches
Evaluator.h
Go to the documentation of this file.
1#pragma once
2
10
11#include "IEvaluator.h"
12#include <memory>
13#include <string>
14
16
25class Evaluator {
26private:
27 std::string modelPath_;
28 std::string nativeWeightsPath_;
31 bool useGPU_;
32
33 std::shared_ptr<const EvalContextMoECacheSharedModel> sharedMoECacheModel_;
34
35public:
43 Evaluator(const std::string &modelPath, int numThreads, bool useGPU = false);
44
50 std::unique_ptr<IEvaluator> createThreadContext();
51
52 bool isLoaded() const { return isMoECache_; }
53 bool isMoE() const { return false; }
54 bool isMoECache() const { return isMoECache_; }
55};
Abstract interface for board evaluation algorithms.
bool isMoECache() const
Definition Evaluator.h:54
std::shared_ptr< const EvalContextMoECacheSharedModel > sharedMoECacheModel_
Shared native model used by all thread contexts.
Definition Evaluator.h:33
Evaluator(const std::string &modelPath, int numThreads, bool useGPU=false)
Constructs an Evaluator manager.
Definition Evaluator.cpp:17
bool isMoE() const
Definition Evaluator.h:53
bool isMoECache_
Definition Evaluator.h:30
bool isLoaded() const
Definition Evaluator.h:52
int numThreads_
Definition Evaluator.h:29
bool useGPU_
Definition Evaluator.h:31
std::string nativeWeightsPath_
Definition Evaluator.h:28
std::string modelPath_
Definition Evaluator.h:27
std::unique_ptr< IEvaluator > createThreadContext()
Creates a lightweight thread context from the shared model.
Definition Evaluator.cpp:41
Contains the shared neural network weights.
Definition EvalContextMoECache.h:27