Knight's Tour Generator
Tourneys and the Fast Generation and Obfuscation of Closed Knight's Tours
Functions
Task.cpp File Reference

Code for task functions. More...

#include "Includes.h"
#include "Defines.h"
#include "Input.h"
#include "Generator.h"

Go to the source code of this file.

Functions

std::atomic_bool g_bFinished (false)
 Search termination flag.
 
bool StartGenerateTask (const CTourneyDesc &t, int nNumThreads)
 
bool StartMeasureTask (const CTourneyDesc &t, int nNumThreads)
 
bool StartTimeTask (const CTourneyDesc &t, int nNumThreads)
 
bool StartTask (Task task, const CTourneyDesc &t, int nNumThreads)
 Start task. More...
 

Function Documentation

◆ StartGenerateTask()

bool StartGenerateTask ( const CTourneyDesc t,
int  nNumThreads 
)

Get the board width and height, then perform the task.

Parameters
tTourney descriptor.
nNumThreadsNumber of concurrent threads.
Returns
true If the user opts to restart instead.

Definition at line 38 of file Task.cpp.

◆ StartMeasureTask()

bool StartMeasureTask ( const CTourneyDesc t,
int  nNumThreads 
)

Get the board width and height and the number of samples, then perform the task.

Parameters
tTourney descriptor.
nNumThreadsNumber of concurrent threads.
Returns
true If the user opts to restart instead.

Definition at line 55 of file Task.cpp.

◆ StartTask()

bool StartTask ( Task  task,
const CTourneyDesc t,
int  nNumThreads 
)

Get task-appropriate parameters from the user and run the task.

Parameters
taskTask to be performed.
tTourney descriptor.
nNumThreadsNumber of concurrent threads.
Returns
true If the user opts to restart instead.

Definition at line 118 of file Task.cpp.

◆ StartTimeTask()

bool StartTimeTask ( const CTourneyDesc t,
int  nNumThreads 
)

Get the number of samples per board size and lower and upper bounds on the range of board sizes to time, then perform the task.

Parameters
tTourney descriptor.
nNumThreadsNumber of concurrent threads.
Returns
true If the user opts to restart instead.

Definition at line 78 of file Task.cpp.