void task_stack_stop(TaskStack *, const Stop)
Condition cond
Definition: ybwc.h:68
volatile bool is_waiting
Definition: ybwc.h:56
struct Node * node
Definition: ybwc.h:34
unsigned long long n_calls
Definition: ybwc.h:37
int n
Definition: ybwc.h:97
void node_init(Node *, struct Search *, const int, const int, const int, const int, Node *)
Initialize a node.
Definition: ybwc.c:59
volatile bool run
Definition: ybwc.h:31
void node_wait_slaves(Node *)
Wait for slaves termination.
Definition: ybwc.c:212
Task * task
Definition: ybwc.h:95
void node_free(Node *)
Free Resources allocated by a node.
Definition: ybwc.c:95
Condition cond
Definition: ybwc.h:40
struct Move * move
Definition: ybwc.h:35
void task_stack_put_idle_task(TaskStack *, Task *)
Put back an idle task after using it.
Definition: ybwc.c:661
bool pv_node
Definition: ybwc.h:53
struct Move * node_first_move(Node *, struct MoveList *)
Get the first move of the move list.
Definition: ybwc.c:297
Lock lock
Definition: ybwc.h:39
bool node_split(Node *, struct Move *)
Node split.
Definition: ybwc.c:167
struct Search * search
Definition: ybwc.h:33
void task_stack_init(TaskStack *, const int)
Initialize the stack of tasks.
Definition: ybwc.c:560
int beta
Definition: ybwc.h:52
volatile bool loop
Definition: ybwc.h:30
struct Search * slave[SPLIT_MAX_SLAVES]
Definition: ybwc.h:60
void node_stop_slaves(Node *)
volatile int n_moves_done
Definition: ybwc.h:63
struct Search * search
Definition: ybwc.h:59
Stop
Definition: const.h:70
void task_init(Task *)
Initialize a task.
Definition: ybwc.c:520
volatile int alpha
Definition: ybwc.h:51
unsigned long long task_stack_count_nodes(TaskStack *)
SpinLock spin
Definition: ybwc.h:94
unsigned long long n_nodes
Definition: ybwc.h:38
void task_stack_free(TaskStack *)
Free resources used by the stack of tasks.
Definition: ybwc.c:607
void task_free(Task *)
Free resources used by a task.
Definition: ybwc.c:540
void task_stack_resize(TaskStack *, const int)
Resize the stack of tasks.
Definition: ybwc.c:626
volatile int n_slave
Definition: ybwc.h:54
Lock lock
Definition: ybwc.h:67
Miscellaneous utilities header.
void task_stack_clear(TaskStack *)
int depth
Definition: ybwc.h:57
struct Move * move
Definition: ybwc.h:62
Task * task_stack_get_idle_task(TaskStack *)
Return, if available, an idle task.
Definition: ybwc.c:638
void task_search(Task *task)
A parallel search within a Task structure.
Definition: ybwc.c:362
#define SPLIT_MAX_SLAVES
Definition: settings.h:107
int height
Definition: ybwc.h:58
volatile int bestmove
Definition: ybwc.h:49
volatile int bestscore
Definition: ybwc.h:50
Thread thread
Definition: ybwc.h:36
int n_idle
Definition: ybwc.h:98
Task help[1]
Definition: ybwc.h:66
volatile int n_moves_todo
Definition: ybwc.h:64
volatile bool is_helping
Definition: ybwc.h:32
Task ** stack
Definition: ybwc.h:96
struct Move * node_next_move(Node *)
Get the next move of the move list.
Definition: ybwc.c:345
volatile bool stop_point
Definition: ybwc.h:55
volatile bool is_helping
Definition: ybwc.h:65
struct TaskStack * container
Definition: ybwc.h:41
struct TaskStack TaskStack
void node_update(Node *, struct Move *)
Update a node.
Definition: ybwc.c:261
void * task_loop(void *)
The main loop runned by a task.
Definition: ybwc.c:453
struct Node * parent
Definition: ybwc.h:61