io-chess
UCI chess engine
Loading...
Searching...
No Matches
WDLWriter Class Reference

#include <Writers.hpp>

Public Member Functions

 WDLWriter (const std::string &fname, size_t batch_capacity=1000)
 ~WDLWriter ()
void add (const WDLOutput &wdl)
void flush ()

Private Attributes

std::string filename
std::vector< float > buffer
size_t batch_size

Detailed Description

WDLWriter - Writes WDL labels during preprocessing

Output format: 3 x float32 per position [Win, Draw, Loss] Total: 12 bytes per position

Constructor & Destructor Documentation

◆ WDLWriter()

WDLWriter::WDLWriter ( const std::string & fname,
size_t batch_capacity = 1000 )

◆ ~WDLWriter()

WDLWriter::~WDLWriter ( )
Here is the call graph for this function:

Member Function Documentation

◆ add()

void WDLWriter::add ( const WDLOutput & wdl)

Add WDL label for one position

Parameters
wdlThe WDLOutput struct from WDLNormalizer
Here is the call graph for this function:
Here is the caller graph for this function:

◆ flush()

void WDLWriter::flush ( )
Here is the caller graph for this function:

Member Data Documentation

◆ batch_size

size_t WDLWriter::batch_size
private

◆ buffer

std::vector<float> WDLWriter::buffer
private

◆ filename

std::string WDLWriter::filename
private

The documentation for this class was generated from the following files: