struct local_optyap_data is now part of struct worker_local (generated from the file LOCALS)
This commit is contained in:
@@ -132,12 +132,12 @@ struct global_pages {
|
||||
|
||||
|
||||
|
||||
/**********************************
|
||||
** Struct global_locks **
|
||||
**********************************/
|
||||
/*****************************************
|
||||
** Struct global_optyap_locks **
|
||||
*****************************************/
|
||||
|
||||
#ifdef YAPOR
|
||||
struct global_locks {
|
||||
struct global_optyap_locks {
|
||||
lockvar bitmap_idle_workers;
|
||||
lockvar bitmap_root_cp_workers;
|
||||
lockvar bitmap_invisible_workers;
|
||||
@@ -160,7 +160,7 @@ struct global_locks {
|
||||
* Struct global_optyap_data **
|
||||
*********************************/
|
||||
|
||||
struct global_optyap_data{
|
||||
struct global_optyap_data {
|
||||
/* global data related to memory management */
|
||||
struct global_pages pages;
|
||||
|
||||
@@ -198,7 +198,7 @@ struct global_optyap_data{
|
||||
#ifdef TABLING_INNER_CUTS
|
||||
volatile bitmap pruning_workers;
|
||||
#endif /* TABLING_INNER_CUTS */
|
||||
struct global_locks locks;
|
||||
struct global_optyap_locks locks;
|
||||
volatile unsigned int branch[MAX_WORKERS][MAX_BRANCH_DEPTH];
|
||||
volatile char parallel_execution_mode; /* TRUE / FALSE */
|
||||
volatile int answers;
|
||||
@@ -251,7 +251,7 @@ struct global_optyap_data{
|
||||
#define Yap_number_goals (Yap_optyap_data.number_of_executed_goals)
|
||||
#define Yap_performance_mode (Yap_optyap_data.performance_mode)
|
||||
#ifdef YAPOR_THREADS
|
||||
#define Get_Yap_root_cp() offset_to_cptr(Yap_optyap_data.root_choice_point_offset)
|
||||
#define Get_Yap_root_cp() offset_to_cptr(Yap_optyap_data.root_choice_point_offset)
|
||||
#define Set_Yap_root_cp(bptr) (Yap_optyap_data.root_choice_point_offset = cptr_to_offset(bptr))
|
||||
#else
|
||||
#define Yap_root_cp (Yap_optyap_data.root_choice_point)
|
||||
@@ -293,12 +293,12 @@ struct global_optyap_data{
|
||||
|
||||
|
||||
|
||||
/***********************************
|
||||
** Struct local_signals **
|
||||
***********************************/
|
||||
/******************************************
|
||||
** Struct local_optyap_signals **
|
||||
******************************************/
|
||||
|
||||
#ifdef YAPOR
|
||||
struct local_signals{
|
||||
struct local_optyap_signals{
|
||||
#if defined(YAPOR_COPY) || defined(YAPOR_THREADS)
|
||||
lockvar lock;
|
||||
volatile enum {
|
||||
@@ -341,11 +341,11 @@ typedef struct {
|
||||
|
||||
|
||||
|
||||
/********************************
|
||||
** Struct local_data **
|
||||
********************************/
|
||||
/***************************************
|
||||
** Struct local_optyap_data **
|
||||
***************************************/
|
||||
|
||||
struct local_data{
|
||||
struct local_optyap_data {
|
||||
#ifdef YAPOR
|
||||
lockvar lock;
|
||||
/* local data related to or-parallelism */
|
||||
@@ -362,7 +362,7 @@ struct local_data{
|
||||
choiceptr prune_request;
|
||||
#endif
|
||||
volatile int share_request;
|
||||
struct local_signals share_signals;
|
||||
struct local_optyap_signals share_signals;
|
||||
volatile struct {
|
||||
CELL start;
|
||||
CELL end;
|
||||
@@ -394,95 +394,95 @@ struct local_data{
|
||||
#endif /* (TABLING || !YAPOR_COW) && MULTI_ASSIGNMENT_VARIABLES */
|
||||
};
|
||||
|
||||
#define LOCAL_lock (LOCAL->lock)
|
||||
#define LOCAL_load (LOCAL->load)
|
||||
#define LOCAL_lock (LOCAL_optyap_data.lock)
|
||||
#define LOCAL_load (LOCAL_optyap_data.load)
|
||||
#ifdef YAPOR_THREADS
|
||||
#define Get_LOCAL_top_cp() offset_to_cptr(LOCAL->top_choice_point_offset)
|
||||
#define Set_LOCAL_top_cp(cpt) (LOCAL->top_choice_point_offset = cptr_to_offset(cpt))
|
||||
#define Get_LOCAL_top_cp() offset_to_cptr(LOCAL_optyap_data.top_choice_point_offset)
|
||||
#define Set_LOCAL_top_cp(cpt) (LOCAL_optyap_data.top_choice_point_offset = cptr_to_offset(cpt))
|
||||
#else
|
||||
#define LOCAL_top_cp (LOCAL->top_choice_point)
|
||||
#define Get_LOCAL_top_cp() (LOCAL->top_choice_point)
|
||||
#define Set_LOCAL_top_cp(cpt) (LOCAL->top_choice_point = cpt)
|
||||
#endif
|
||||
#define LOCAL_top_or_fr (LOCAL->top_or_frame)
|
||||
#define LOCAL_top_cp (LOCAL_optyap_data.top_choice_point)
|
||||
#define Get_LOCAL_top_cp() (LOCAL_optyap_data.top_choice_point)
|
||||
#define Set_LOCAL_top_cp(cpt) (LOCAL_optyap_data.top_choice_point = cpt)
|
||||
#endif /* YAPOR_THREADS */
|
||||
#define LOCAL_top_or_fr (LOCAL_optyap_data.top_or_frame)
|
||||
#ifdef YAPOR_THREADS
|
||||
#define Get_LOCAL_prune_request() offset_to_cptr_with_null(LOCAL->prune_request_offset)
|
||||
#define Set_LOCAL_prune_request(cpt) (LOCAL->prune_request_offset = cptr_to_offset_with_null(cpt))
|
||||
#define Get_LOCAL_prune_request() offset_to_cptr_with_null(LOCAL_optyap_data.prune_request_offset)
|
||||
#define Set_LOCAL_prune_request(cpt) (LOCAL_optyap_data.prune_request_offset = cptr_to_offset_with_null(cpt))
|
||||
#else
|
||||
#define LOCAL_prune_request (LOCAL->prune_request)
|
||||
#define Get_LOCAL_prune_request() (LOCAL->prune_request)
|
||||
#define Set_LOCAL_prune_request(cpt) (LOCAL->prune_request = cpt)
|
||||
#endif
|
||||
#define LOCAL_share_request (LOCAL->share_request)
|
||||
#define LOCAL_reply_signal (LOCAL->share_signals.reply_signal)
|
||||
#define LOCAL_p_fase_signal (LOCAL->share_signals.P_fase)
|
||||
#define LOCAL_q_fase_signal (LOCAL->share_signals.Q_fase)
|
||||
#define LOCAL_lock_signals (LOCAL->share_signals.lock)
|
||||
#define LOCAL_start_global_copy (LOCAL->global_copy.start)
|
||||
#define LOCAL_end_global_copy (LOCAL->global_copy.end)
|
||||
#define LOCAL_start_local_copy (LOCAL->local_copy.start)
|
||||
#define LOCAL_end_local_copy (LOCAL->local_copy.end)
|
||||
#define LOCAL_start_trail_copy (LOCAL->trail_copy.start)
|
||||
#define LOCAL_end_trail_copy (LOCAL->trail_copy.end)
|
||||
#define LOCAL_next_free_ans_node (LOCAL->next_free_answer_trie_node)
|
||||
#define LOCAL_top_sg_fr (LOCAL->top_subgoal_frame)
|
||||
#define LOCAL_top_dep_fr (LOCAL->top_dependency_frame)
|
||||
#define LOCAL_pruning_scope (LOCAL->bottom_pruning_scope)
|
||||
#define LOCAL_prune_request (LOCAL_optyap_data.prune_request)
|
||||
#define Get_LOCAL_prune_request() (LOCAL_optyap_data.prune_request)
|
||||
#define Set_LOCAL_prune_request(cpt) (LOCAL_optyap_data.prune_request = cpt)
|
||||
#endif /* YAPOR_THREADS */
|
||||
#define LOCAL_share_request (LOCAL_optyap_data.share_request)
|
||||
#define LOCAL_reply_signal (LOCAL_optyap_data.share_signals.reply_signal)
|
||||
#define LOCAL_p_fase_signal (LOCAL_optyap_data.share_signals.P_fase)
|
||||
#define LOCAL_q_fase_signal (LOCAL_optyap_data.share_signals.Q_fase)
|
||||
#define LOCAL_lock_signals (LOCAL_optyap_data.share_signals.lock)
|
||||
#define LOCAL_start_global_copy (LOCAL_optyap_data.global_copy.start)
|
||||
#define LOCAL_end_global_copy (LOCAL_optyap_data.global_copy.end)
|
||||
#define LOCAL_start_local_copy (LOCAL_optyap_data.local_copy.start)
|
||||
#define LOCAL_end_local_copy (LOCAL_optyap_data.local_copy.end)
|
||||
#define LOCAL_start_trail_copy (LOCAL_optyap_data.trail_copy.start)
|
||||
#define LOCAL_end_trail_copy (LOCAL_optyap_data.trail_copy.end)
|
||||
#define LOCAL_next_free_ans_node (LOCAL_optyap_data.next_free_answer_trie_node)
|
||||
#define LOCAL_top_sg_fr (LOCAL_optyap_data.top_subgoal_frame)
|
||||
#define LOCAL_top_dep_fr (LOCAL_optyap_data.top_dependency_frame)
|
||||
#define LOCAL_pruning_scope (LOCAL_optyap_data.bottom_pruning_scope)
|
||||
#ifdef YAPOR_THREADS
|
||||
#define Get_LOCAL_top_cp_on_stack() offset_to_cptr(LOCAL->top_choice_point_on_stack_offset)
|
||||
#define Set_LOCAL_top_cp_on_stack(cpt) (LOCAL->top_choice_point_on_stack_offset = cptr_to_offset(cpt))
|
||||
#define Get_LOCAL_top_cp_on_stack() offset_to_cptr(LOCAL_optyap_data.top_choice_point_on_stack_offset)
|
||||
#define Set_LOCAL_top_cp_on_stack(cpt) (LOCAL_optyap_data.top_choice_point_on_stack_offset = cptr_to_offset(cpt))
|
||||
#else
|
||||
#define LOCAL_top_cp_on_stack (LOCAL->top_choice_point_on_stack)
|
||||
#define Get_LOCAL_top_cp_on_stack() (LOCAL->top_choice_point_on_stack)
|
||||
#define Set_LOCAL_top_cp_on_stack(cpt) (LOCAL->top_choice_point_on_stack = cpt)
|
||||
#endif
|
||||
#define LOCAL_top_susp_or_fr (LOCAL->top_or_frame_with_suspensions)
|
||||
#define LOCAL_ma_timestamp (LOCAL->ma_timestamp)
|
||||
#define LOCAL_ma_h_top (LOCAL->ma_h_top)
|
||||
#define LOCAL_ma_hash_table (LOCAL->ma_hash_table)
|
||||
#define LOCAL_top_cp_on_stack (LOCAL_optyap_data.top_choice_point_on_stack)
|
||||
#define Get_LOCAL_top_cp_on_stack() (LOCAL_optyap_data.top_choice_point_on_stack)
|
||||
#define Set_LOCAL_top_cp_on_stack(cpt) (LOCAL_optyap_data.top_choice_point_on_stack = cpt)
|
||||
#endif /* YAPOR_THREADS */
|
||||
#define LOCAL_top_susp_or_fr (LOCAL_optyap_data.top_or_frame_with_suspensions)
|
||||
#define LOCAL_ma_timestamp (LOCAL_optyap_data.ma_timestamp)
|
||||
#define LOCAL_ma_h_top (LOCAL_optyap_data.ma_h_top)
|
||||
#define LOCAL_ma_hash_table (LOCAL_optyap_data.ma_hash_table)
|
||||
|
||||
|
||||
#define REMOTE_lock(worker) (REMOTE[worker].lock)
|
||||
#define REMOTE_load(worker) (REMOTE[worker].load)
|
||||
#define REMOTE_lock(wid) (REMOTE(wid)->optyap_data.lock)
|
||||
#define REMOTE_load(wid) (REMOTE(wid)->optyap_data.load)
|
||||
#ifdef YAPOR_THREADS
|
||||
#define REMOTE_top_cp(worker) offset_to_cptr(REMOTE[worker].top_choice_point_offset)
|
||||
#define Set_REMOTE_top_cp(worker, bptr) (REMOTE[worker].top_choice_point_offset = cptr_to_offset(bptr))
|
||||
#define REMOTE_top_cp(wid) offset_to_cptr(REMOTE(wid)->optyap_data.top_choice_point_offset)
|
||||
#define Set_REMOTE_top_cp(wid, bptr) (REMOTE(wid)->optyap_data.top_choice_point_offset = cptr_to_offset(bptr))
|
||||
#else
|
||||
#define REMOTE_top_cp(worker) (REMOTE[worker].top_choice_point)
|
||||
#define Set_REMOTE_top_cp(worker, bptr) (REMOTE[worker].top_choice_point = (bptr))
|
||||
#endif
|
||||
#define REMOTE_top_or_fr(worker) (REMOTE[worker].top_or_frame)
|
||||
#define REMOTE_top_cp(wid) (REMOTE(wid)->optyap_data.top_choice_point)
|
||||
#define Set_REMOTE_top_cp(wid, bptr) (REMOTE(wid)->optyap_data.top_choice_point = (bptr))
|
||||
#endif /* YAPOR_THREADS */
|
||||
#define REMOTE_top_or_fr(wid) (REMOTE(wid)->optyap_data.top_or_frame)
|
||||
#ifdef YAPOR_THREADS
|
||||
#define Get_REMOTE_prune_request(worker) offset_to_cptr_with_null(REMOTE[worker].prune_request_offset)
|
||||
#define Set_REMOTE_prune_request(worker,cp) (REMOTE[worker].prune_request_offset = cptr_to_offset_with_null(cp))
|
||||
#define Get_REMOTE_prune_request(wid) offset_to_cptr_with_null(REMOTE(wid)->optyap_data.prune_request_offset)
|
||||
#define Set_REMOTE_prune_request(wid,cp) (REMOTE(wid)->optyap_data.prune_request_offset = cptr_to_offset_with_null(cp))
|
||||
#else
|
||||
#define REMOTE_prune_request(worker) (REMOTE[worker].prune_request)
|
||||
#define Get_REMOTE_prune_request(worker) (REMOTE[worker].prune_request)
|
||||
#define Set_REMOTE_prune_request(worker,cp) (REMOTE[worker].prune_request = cp)
|
||||
#endif
|
||||
#define REMOTE_share_request(worker) (REMOTE[worker].share_request)
|
||||
#define REMOTE_reply_signal(worker) (REMOTE[worker].share_signals.reply_signal)
|
||||
#define REMOTE_p_fase_signal(worker) (REMOTE[worker].share_signals.P_fase)
|
||||
#define REMOTE_q_fase_signal(worker) (REMOTE[worker].share_signals.Q_fase)
|
||||
#define REMOTE_lock_signals(worker) (REMOTE[worker].share_signals.lock)
|
||||
#define REMOTE_start_global_copy(worker) (REMOTE[worker].global_copy.start)
|
||||
#define REMOTE_end_global_copy(worker) (REMOTE[worker].global_copy.end)
|
||||
#define REMOTE_start_local_copy(worker) (REMOTE[worker].local_copy.start)
|
||||
#define REMOTE_end_local_copy(worker) (REMOTE[worker].local_copy.end)
|
||||
#define REMOTE_start_trail_copy(worker) (REMOTE[worker].trail_copy.start)
|
||||
#define REMOTE_end_trail_copy(worker) (REMOTE[worker].trail_copy.end)
|
||||
#define REMOTE_next_free_ans_node(worker) (REMOTE[worker].next_free_answer_trie_node)
|
||||
#define REMOTE_top_sg_fr(worker) (REMOTE[worker].top_subgoal_frame)
|
||||
#define REMOTE_top_dep_fr(worker) (REMOTE[worker].top_dependency_frame)
|
||||
#define REMOTE_pruning_scope(worker) (REMOTE[worker].bottom_pruning_scope)
|
||||
#define REMOTE_prune_request(wid) (REMOTE(wid)->optyap_data.prune_request)
|
||||
#define Get_REMOTE_prune_request(wid) (REMOTE(wid)->optyap_data.prune_request)
|
||||
#define Set_REMOTE_prune_request(wid,cp) (REMOTE(wid)->optyap_data.prune_request = cp)
|
||||
#endif /* YAPOR_THREADS */
|
||||
#define REMOTE_share_request(wid) (REMOTE(wid)->optyap_data.share_request)
|
||||
#define REMOTE_reply_signal(wid) (REMOTE(wid)->optyap_data.share_signals.reply_signal)
|
||||
#define REMOTE_p_fase_signal(wid) (REMOTE(wid)->optyap_data.share_signals.P_fase)
|
||||
#define REMOTE_q_fase_signal(wid) (REMOTE(wid)->optyap_data.share_signals.Q_fase)
|
||||
#define REMOTE_lock_signals(wid) (REMOTE(wid)->optyap_data.share_signals.lock)
|
||||
#define REMOTE_start_global_copy(wid) (REMOTE(wid)->optyap_data.global_copy.start)
|
||||
#define REMOTE_end_global_copy(wid) (REMOTE(wid)->optyap_data.global_copy.end)
|
||||
#define REMOTE_start_local_copy(wid) (REMOTE(wid)->optyap_data.local_copy.start)
|
||||
#define REMOTE_end_local_copy(wid) (REMOTE(wid)->optyap_data.local_copy.end)
|
||||
#define REMOTE_start_trail_copy(wid) (REMOTE(wid)->optyap_data.trail_copy.start)
|
||||
#define REMOTE_end_trail_copy(wid) (REMOTE(wid)->optyap_data.trail_copy.end)
|
||||
#define REMOTE_next_free_ans_node(wid) (REMOTE(wid)->optyap_data.next_free_answer_trie_node)
|
||||
#define REMOTE_top_sg_fr(wid) (REMOTE(wid)->optyap_data.top_subgoal_frame)
|
||||
#define REMOTE_top_dep_fr(wid) (REMOTE(wid)->optyap_data.top_dependency_frame)
|
||||
#define REMOTE_pruning_scope(wid) (REMOTE(wid)->optyap_data.bottom_pruning_scope)
|
||||
#ifdef YAPOR_THREADS
|
||||
#define REMOTE_top_cp_on_stack(worker) offset_to_cptr(REMOTE[worker].top_choice_point_on_stack_offset)
|
||||
#define Set_REMOTE_top_cp_on_stack(worker, bptr) (REMOTE[worker].top_choice_point_on_stack_offset = cptr_to_offset(bptr))
|
||||
#define REMOTE_top_cp_on_stack(wid) offset_to_cptr(REMOTE(wid)->optyap_data.top_choice_point_on_stack_offset)
|
||||
#define Set_REMOTE_top_cp_on_stack(wid, bptr) (REMOTE(wid)->optyap_data.top_choice_point_on_stack_offset = cptr_to_offset(bptr))
|
||||
#else
|
||||
#define REMOTE_top_cp_on_stack(worker) (REMOTE[worker].top_choice_point_on_stack)
|
||||
#define Set_REMOTE_top_cp_on_stack(worker, bptr) (REMOTE[worker].top_choice_point_on_stack = (bptr))
|
||||
#endif
|
||||
#define REMOTE_top_susp_or_fr(worker) (REMOTE[worker].top_or_frame_with_suspensions)
|
||||
#define REMOTE_top_cp_on_stack(wid) (REMOTE(wid)->optyap_data.top_choice_point_on_stack)
|
||||
#define Set_REMOTE_top_cp_on_stack(wid, bptr) (REMOTE(wid)->optyap_data.top_choice_point_on_stack = (bptr))
|
||||
#endif /* YAPOR_THREADS */
|
||||
#define REMOTE_top_susp_or_fr(wid) (REMOTE(wid)->optyap_data.top_or_frame_with_suspensions)
|
||||
|
||||
|
||||
#ifdef YAPOR
|
||||
|
Reference in New Issue
Block a user