Adding tabling support for mixed strategy evaluation (batched and local scheduling)

UPDATE: compilation flags -DTABLING_BATCHED_SCHEDULING and -DTABLING_LOCAL_SCHEDULING removed. To support tabling use -DTABLING in the Makefile or --enable-tabling in configure.
  NEW: yap_flag(tabling_mode,MODE) changes the tabling execution mode of all tabled predicates to MODE (batched, local or default).
  NEW: tabling_mode(PRED,MODE) changes the default tabling execution mode of predicate PRED to MODE (batched or local).


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1268 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
ricroc
2005-04-07 17:56:58 +00:00
parent b089ae2575
commit de17f5cca4
31 changed files with 1082 additions and 930 deletions

View File

@@ -20,7 +20,6 @@ STD_PROTO(static inline void SCH_refuse_share_request_if_any, (void));
STD_PROTO(static inline void SCH_set_load, (choiceptr));
STD_PROTO(static inline void SCH_new_alternative, (yamop *,yamop *));
STD_PROTO(static inline void CUT_prune_to, (choiceptr));
STD_PROTO(static inline void CUT_send_prune_request, (int, choiceptr));
STD_PROTO(static inline void CUT_reset_prune_request, (void));
@@ -152,6 +151,13 @@ STD_PROTO(static inline qg_sol_fr_ptr CUT_prune_solution_frames, (qg_sol_fr_ptr,
** Cut Macros **
** -------------------- */
#define CUT_prune_to(PRUNE_CP) \
if (YOUNGER_CP(LOCAL_top_cp, PRUNE_CP)) { \
if (! LOCAL_prune_request) \
prune_shared_branch(PRUNE_CP); \
PRUNE_CP = LOCAL_top_cp; \
}
#define CUT_wait_leftmost() \
if (PARALLEL_EXECUTION_MODE) { \
/* parallel execution mode --> wait until leftmost */ \
@@ -318,19 +324,6 @@ void SCH_new_alternative(yamop *curpc, yamop *new) {
** Cut Stuff: Pruning **
** ---------------------------- */
static inline
void CUT_prune_to(choiceptr prune_cp) {
if (EQUAL_OR_YOUNGER_CP(prune_cp, LOCAL_top_cp)) {
B = prune_cp;
} else {
if (! LOCAL_prune_request)
prune_shared_branch(prune_cp);
B = LOCAL_top_cp;
}
return;
}
static inline
void CUT_send_prune_request(int worker, choiceptr prune_cp) {
LOCK_WORKER(worker);