patch for OPTYap from João Silva

This commit is contained in:
Vitor Santos Costa
2014-02-05 16:21:21 +00:00
parent ce6bc98f30
commit 6c7e5e3cd2
6 changed files with 9 additions and 7 deletions

View File

@@ -58,7 +58,7 @@ static void share_private_nodes(int worker_q);
#else
#define COMPUTE_SEGMENTS_TO_COPY_TO(Q) \
REMOTE_start_global_copy(Q) = (CELL) (H0); \
REMOTE_end_global_copy(Q) = (CELL) (H); \
REMOTE_end_global_copy(Q) = (CELL) (HR); \
REMOTE_start_local_copy(Q) = (CELL) (B); \
REMOTE_end_local_copy(Q) = (CELL) (GLOBAL_root_cp); \
REMOTE_start_trail_copy(Q) = (CELL) (GLOBAL_root_cp->cp_tr); \
@@ -311,7 +311,7 @@ sync_with_p:
/* install fase --> TR and LOCAL_top_cp->cp_tr are equal */
aux_tr = ((choiceptr) LOCAL_start_local_copy)->cp_tr;
TR = ((choiceptr) LOCAL_end_local_copy)->cp_tr;
Yap_NEW_MAHASH((ma_h_inner_struct *)H);
Yap_NEW_MAHASH((ma_h_inner_struct *)HR);
while (TR != aux_tr) {
aux_cell = TrailTerm(--aux_tr);
if (IsVarTerm(aux_cell)) {

View File

@@ -158,7 +158,7 @@ static inline qg_sol_fr_ptr CUT_prune_solution_frames(qg_sol_fr_ptr, int);
SCH_check_share_request()
#define SCH_last_alternative(curpc, CP_PTR) \
H = HBREG = PROTECT_FROZEN_H(CP_PTR); \
HR = HBREG = PROTECT_FROZEN_H(CP_PTR); \
CPREG = CP_PTR->cp_cp; \
ENV = CP_PTR->cp_env; \
SCH_new_alternative(curpc, NULL)

View File

@@ -183,7 +183,7 @@ int q_share_work(int worker_p) {
/* install fase --> TR and LOCAL_top_cp->cp_tr are equal */
TR = ((choiceptr)LOCAL_end_local_copy)->cp_tr;
aux_tr = ((choiceptr) LOCAL_start_local_copy)->cp_tr;
NEW_MAHASH((ma_h_inner_struct *)H);
NEW_MAHASH((ma_h_inner_struct *)HR);
while (TR != aux_tr) {
aux_cell = TrailTerm(--aux_tr);
if (IsVarTerm(aux_cell)) {