LOCALS and GLOBALS are now generated by misc/buildlocalglobal.

This commit is contained in:
Joao
2011-05-11 18:22:58 +01:00
parent d6fc76faf1
commit ab63cd190b
17 changed files with 1051 additions and 714 deletions

View File

@@ -224,72 +224,72 @@ struct global_optyap_data {
#endif /* TABLING */
};
#define GLOBAL_max_pages (Yap_optyap_data.pages.max_pages)
#define GLOBAL_pages_void (Yap_optyap_data.pages.void_pages)
#define GLOBAL_pages_or_fr (Yap_optyap_data.pages.or_frame_pages)
#define GLOBAL_pages_qg_sol_fr (Yap_optyap_data.pages.query_goal_solution_frame_pages)
#define GLOBAL_pages_qg_ans_fr (Yap_optyap_data.pages.query_goal_answer_frame_pages)
#define GLOBAL_pages_tg_sol_fr (Yap_optyap_data.pages.table_subgoal_solution_frame_pages)
#define GLOBAL_pages_tg_ans_fr (Yap_optyap_data.pages.table_subgoal_answer_frame_pages)
#define GLOBAL_pages_tab_ent (Yap_optyap_data.pages.table_entry_pages)
#define GLOBAL_pages_sg_fr (Yap_optyap_data.pages.subgoal_frame_pages)
#define GLOBAL_pages_dep_fr (Yap_optyap_data.pages.dependency_frame_pages)
#define GLOBAL_pages_sg_node (Yap_optyap_data.pages.subgoal_trie_node_pages)
#define GLOBAL_pages_ans_node (Yap_optyap_data.pages.answer_trie_node_pages)
#define GLOBAL_pages_gt_node (Yap_optyap_data.pages.global_trie_node_pages)
#define GLOBAL_pages_sg_hash (Yap_optyap_data.pages.subgoal_trie_hash_pages)
#define GLOBAL_pages_ans_hash (Yap_optyap_data.pages.answer_trie_hash_pages)
#define GLOBAL_pages_gt_hash (Yap_optyap_data.pages.global_trie_hash_pages)
#define GLOBAL_pages_susp_fr (Yap_optyap_data.pages.suspension_frame_pages)
#define GLOBAL_scheduler_loop (Yap_optyap_data.scheduler_loop)
#define GLOBAL_delayed_release_load (Yap_optyap_data.delayed_release_load)
#define GLOBAL_number_workers (Yap_optyap_data.number_workers)
#define GLOBAL_worker_pid(worker) (Yap_optyap_data.worker_pid[worker])
#define GLOBAL_master_worker (Yap_optyap_data.master_worker)
#define GLOBAL_execution_time (Yap_optyap_data.execution_time)
#define GLOBAL_best_times(time) (Yap_optyap_data.best_execution_times[time])
#define GLOBAL_number_goals (Yap_optyap_data.number_of_executed_goals)
#define GLOBAL_performance_mode (Yap_optyap_data.performance_mode)
#define GLOBAL_max_pages (GLOBAL_optyap_data.pages.max_pages)
#define GLOBAL_pages_void (GLOBAL_optyap_data.pages.void_pages)
#define GLOBAL_pages_or_fr (GLOBAL_optyap_data.pages.or_frame_pages)
#define GLOBAL_pages_qg_sol_fr (GLOBAL_optyap_data.pages.query_goal_solution_frame_pages)
#define GLOBAL_pages_qg_ans_fr (GLOBAL_optyap_data.pages.query_goal_answer_frame_pages)
#define GLOBAL_pages_tg_sol_fr (GLOBAL_optyap_data.pages.table_subgoal_solution_frame_pages)
#define GLOBAL_pages_tg_ans_fr (GLOBAL_optyap_data.pages.table_subgoal_answer_frame_pages)
#define GLOBAL_pages_tab_ent (GLOBAL_optyap_data.pages.table_entry_pages)
#define GLOBAL_pages_sg_fr (GLOBAL_optyap_data.pages.subgoal_frame_pages)
#define GLOBAL_pages_dep_fr (GLOBAL_optyap_data.pages.dependency_frame_pages)
#define GLOBAL_pages_sg_node (GLOBAL_optyap_data.pages.subgoal_trie_node_pages)
#define GLOBAL_pages_ans_node (GLOBAL_optyap_data.pages.answer_trie_node_pages)
#define GLOBAL_pages_gt_node (GLOBAL_optyap_data.pages.global_trie_node_pages)
#define GLOBAL_pages_sg_hash (GLOBAL_optyap_data.pages.subgoal_trie_hash_pages)
#define GLOBAL_pages_ans_hash (GLOBAL_optyap_data.pages.answer_trie_hash_pages)
#define GLOBAL_pages_gt_hash (GLOBAL_optyap_data.pages.global_trie_hash_pages)
#define GLOBAL_pages_susp_fr (GLOBAL_optyap_data.pages.suspension_frame_pages)
#define GLOBAL_scheduler_loop (GLOBAL_optyap_data.scheduler_loop)
#define GLOBAL_delayed_release_load (GLOBAL_optyap_data.delayed_release_load)
#define GLOBAL_number_workers (GLOBAL_optyap_data.number_workers)
#define GLOBAL_worker_pid(worker) (GLOBAL_optyap_data.worker_pid[worker])
#define GLOBAL_master_worker (GLOBAL_optyap_data.master_worker)
#define GLOBAL_execution_time (GLOBAL_optyap_data.execution_time)
#define GLOBAL_best_times(time) (GLOBAL_optyap_data.best_execution_times[time])
#define GLOBAL_number_goals (GLOBAL_optyap_data.number_of_executed_goals)
#define GLOBAL_performance_mode (GLOBAL_optyap_data.performance_mode)
#ifdef YAPOR_THREADS
#define Get_GLOBAL_root_cp() offset_to_cptr(Yap_optyap_data.root_choice_point_offset)
#define Set_GLOBAL_root_cp(bptr) (Yap_optyap_data.root_choice_point_offset = cptr_to_offset(bptr))
#define Get_GLOBAL_root_cp() offset_to_cptr(GLOBAL_optyap_data.root_choice_point_offset)
#define Set_GLOBAL_root_cp(bptr) (GLOBAL_optyap_data.root_choice_point_offset = cptr_to_offset(bptr))
#else
#define GLOBAL_root_cp (Yap_optyap_data.root_choice_point)
#define Get_GLOBAL_root_cp() (Yap_optyap_data.root_choice_point)
#define Set_GLOBAL_root_cp(bptr) (Yap_optyap_data.root_choice_point = (bptr))
#define GLOBAL_root_cp (GLOBAL_optyap_data.root_choice_point)
#define Get_GLOBAL_root_cp() (GLOBAL_optyap_data.root_choice_point)
#define Set_GLOBAL_root_cp(bptr) (GLOBAL_optyap_data.root_choice_point = (bptr))
#endif
#define GLOBAL_root_or_fr (Yap_optyap_data.root_or_frame)
#define GLOBAL_bm_present_workers (Yap_optyap_data.present_workers)
#define GLOBAL_bm_idle_workers (Yap_optyap_data.idle_workers)
#define GLOBAL_bm_root_cp_workers (Yap_optyap_data.root_cp_workers)
#define GLOBAL_bm_invisible_workers (Yap_optyap_data.invisible_workers)
#define GLOBAL_bm_requestable_workers (Yap_optyap_data.requestable_workers)
#define GLOBAL_bm_executing_workers (Yap_optyap_data.executing_workers)
#define GLOBAL_bm_finished_workers (Yap_optyap_data.finished_workers)
#define GLOBAL_bm_pruning_workers (Yap_optyap_data.pruning_workers)
#define GLOBAL_locks_bm_idle_workers (Yap_optyap_data.locks.bitmap_idle_workers)
#define GLOBAL_locks_bm_root_cp_workers (Yap_optyap_data.locks.bitmap_root_cp_workers)
#define GLOBAL_locks_bm_invisible_workers (Yap_optyap_data.locks.bitmap_invisible_workers)
#define GLOBAL_locks_bm_requestable_workers (Yap_optyap_data.locks.bitmap_requestable_workers)
#define GLOBAL_locks_bm_executing_workers (Yap_optyap_data.locks.bitmap_executing_workers)
#define GLOBAL_locks_bm_finished_workers (Yap_optyap_data.locks.bitmap_finished_workers)
#define GLOBAL_locks_bm_pruning_workers (Yap_optyap_data.locks.bitmap_pruning_workers)
#define GLOBAL_locks_who_locked_heap (Yap_optyap_data.locks.who_locked_heap)
#define GLOBAL_locks_heap_access (Yap_optyap_data.locks.heap_access)
#define GLOBAL_locks_alloc_block (Yap_optyap_data.locks.alloc_block)
#define GLOBAL_branch(worker, depth) (Yap_optyap_data.branch[worker][depth])
#define GLOBAL_parallel_execution_mode (Yap_optyap_data.parallel_execution_mode)
#define GLOBAL_answers (Yap_optyap_data.answers)
#define GLOBAL_root_gt (Yap_optyap_data.root_global_trie)
#define GLOBAL_root_tab_ent (Yap_optyap_data.root_table_entry)
#define GLOBAL_first_sg_fr (Yap_optyap_data.first_subgoal_frame)
#define GLOBAL_last_sg_fr (Yap_optyap_data.last_subgoal_frame)
#define GLOBAL_check_sg_fr (Yap_optyap_data.check_subgoal_frame)
#define GLOBAL_root_dep_fr (Yap_optyap_data.root_dependency_frame)
#define GLOBAL_table_var_enumerator(index) (Yap_optyap_data.table_var_enumerator[index])
#define GLOBAL_table_var_enumerator_addr(index) (Yap_optyap_data.table_var_enumerator + (index))
#define GLOBAL_table_lock(index) (Yap_optyap_data.table_lock[index])
#define GLOBAL_timestamp (Yap_optyap_data.timestamp)
#define GLOBAL_root_or_fr (GLOBAL_optyap_data.root_or_frame)
#define GLOBAL_bm_present_workers (GLOBAL_optyap_data.present_workers)
#define GLOBAL_bm_idle_workers (GLOBAL_optyap_data.idle_workers)
#define GLOBAL_bm_root_cp_workers (GLOBAL_optyap_data.root_cp_workers)
#define GLOBAL_bm_invisible_workers (GLOBAL_optyap_data.invisible_workers)
#define GLOBAL_bm_requestable_workers (GLOBAL_optyap_data.requestable_workers)
#define GLOBAL_bm_executing_workers (GLOBAL_optyap_data.executing_workers)
#define GLOBAL_bm_finished_workers (GLOBAL_optyap_data.finished_workers)
#define GLOBAL_bm_pruning_workers (GLOBAL_optyap_data.pruning_workers)
#define GLOBAL_locks_bm_idle_workers (GLOBAL_optyap_data.locks.bitmap_idle_workers)
#define GLOBAL_locks_bm_root_cp_workers (GLOBAL_optyap_data.locks.bitmap_root_cp_workers)
#define GLOBAL_locks_bm_invisible_workers (GLOBAL_optyap_data.locks.bitmap_invisible_workers)
#define GLOBAL_locks_bm_requestable_workers (GLOBAL_optyap_data.locks.bitmap_requestable_workers)
#define GLOBAL_locks_bm_executing_workers (GLOBAL_optyap_data.locks.bitmap_executing_workers)
#define GLOBAL_locks_bm_finished_workers (GLOBAL_optyap_data.locks.bitmap_finished_workers)
#define GLOBAL_locks_bm_pruning_workers (GLOBAL_optyap_data.locks.bitmap_pruning_workers)
#define GLOBAL_locks_who_locked_heap (GLOBAL_optyap_data.locks.who_locked_heap)
#define GLOBAL_locks_heap_access (GLOBAL_optyap_data.locks.heap_access)
#define GLOBAL_locks_alloc_block (GLOBAL_optyap_data.locks.alloc_block)
#define GLOBAL_branch(worker, depth) (GLOBAL_optyap_data.branch[worker][depth])
#define GLOBAL_parallel_execution_mode (GLOBAL_optyap_data.parallel_execution_mode)
#define GLOBAL_answers (GLOBAL_optyap_data.answers)
#define GLOBAL_root_gt (GLOBAL_optyap_data.root_global_trie)
#define GLOBAL_root_tab_ent (GLOBAL_optyap_data.root_table_entry)
#define GLOBAL_first_sg_fr (GLOBAL_optyap_data.first_subgoal_frame)
#define GLOBAL_last_sg_fr (GLOBAL_optyap_data.last_subgoal_frame)
#define GLOBAL_check_sg_fr (GLOBAL_optyap_data.check_subgoal_frame)
#define GLOBAL_root_dep_fr (GLOBAL_optyap_data.root_dependency_frame)
#define GLOBAL_table_var_enumerator(index) (GLOBAL_optyap_data.table_var_enumerator[index])
#define GLOBAL_table_var_enumerator_addr(index) (GLOBAL_optyap_data.table_var_enumerator + (index))
#define GLOBAL_table_lock(index) (GLOBAL_optyap_data.table_lock[index])
#define GLOBAL_timestamp (GLOBAL_optyap_data.timestamp)
@@ -442,47 +442,47 @@ struct local_optyap_data {
#define LOCAL_ma_hash_table (LOCAL_optyap_data.ma_hash_table)
#define REMOTE_lock(wid) (REMOTE(wid)->optyap_data.lock)
#define REMOTE_load(wid) (REMOTE(wid)->optyap_data.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(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))
#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(wid) (REMOTE(wid)->optyap_data.top_choice_point)
#define Set_REMOTE_top_cp(wid, bptr) (REMOTE(wid)->optyap_data.top_choice_point = (bptr))
#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)
#define REMOTE_top_or_fr(wid) (REMOTE(wid)->optyap_data_.top_or_frame)
#ifdef YAPOR_THREADS
#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))
#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(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)
#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)
#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(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))
#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(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))
#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)
#define REMOTE_top_susp_or_fr(wid) (REMOTE(wid)->optyap_data_.top_or_frame_with_suspensions)
#ifdef YAPOR