fix cut support for or-parallelism
This commit is contained in:
parent
45e5e3b983
commit
22d8e33a5f
@ -1453,7 +1453,7 @@ static Int has_cut(yamop *pc, PredEntry *ap)
|
|||||||
{
|
{
|
||||||
if (ap->PredFlags & LogUpdatePredFlag) {
|
if (ap->PredFlags & LogUpdatePredFlag) {
|
||||||
LogUpdClause *lcl = ClauseCodeToLogUpdClause(pc);
|
LogUpdClause *lcl = ClauseCodeToLogUpdClause(pc);
|
||||||
return lcl->ClFlags & HasCutMask;
|
return lcl->ClFlags & HasCutMask ? 1 : 0;
|
||||||
} else if (ap->PredFlags & MegaClausePredFlag) {
|
} else if (ap->PredFlags & MegaClausePredFlag) {
|
||||||
/* must be a fact */
|
/* must be a fact */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -1461,7 +1461,7 @@ static Int has_cut(yamop *pc, PredEntry *ap)
|
|||||||
StaticClause *scl;
|
StaticClause *scl;
|
||||||
|
|
||||||
scl = ClauseCodeToStaticClause(pc);
|
scl = ClauseCodeToStaticClause(pc);
|
||||||
return scl->ClFlags & HasCutMask;
|
return scl->ClFlags & HasCutMask ? 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1540,6 +1540,9 @@ static inline void
|
|||||||
prune(choiceptr cp)
|
prune(choiceptr cp)
|
||||||
{
|
{
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
|
#ifdef YAPOR
|
||||||
|
CUT_prune_to(cp);
|
||||||
|
#endif /* YAPOR */
|
||||||
if (SHOULD_CUT_UP_TO(B,cp))
|
if (SHOULD_CUT_UP_TO(B,cp))
|
||||||
{
|
{
|
||||||
if (ASP > (CELL *)PROTECT_FROZEN_B(B))
|
if (ASP > (CELL *)PROTECT_FROZEN_B(B))
|
||||||
@ -1555,9 +1558,6 @@ prune(choiceptr cp)
|
|||||||
{
|
{
|
||||||
POP_EXECUTE();
|
POP_EXECUTE();
|
||||||
}
|
}
|
||||||
#ifdef YAPOR
|
|
||||||
CUT_prune_to(cp);
|
|
||||||
#endif /* YAPOR */
|
|
||||||
/* cut ! */
|
/* cut ! */
|
||||||
#ifdef TABLING
|
#ifdef TABLING
|
||||||
abolish_incomplete_subgoals(B);
|
abolish_incomplete_subgoals(B);
|
||||||
|
@ -169,12 +169,12 @@ STD_PROTO(static inline qg_sol_fr_ptr CUT_prune_solution_frames, (qg_sol_fr_ptr,
|
|||||||
** Cut Macros **
|
** Cut Macros **
|
||||||
** -------------------- */
|
** -------------------- */
|
||||||
|
|
||||||
#define CUT_prune_to(PRUNE_CP) \
|
#define CUT_prune_to(PRUNE_CP) \
|
||||||
if (YOUNGER_CP(Get_LOCAL_top_cp(), PRUNE_CP)) { \
|
if (YOUNGER_CP(Get_LOCAL_top_cp(), PRUNE_CP)) { \
|
||||||
if (! Get_LOCAL_prune_request()) \
|
if (! Get_LOCAL_prune_request()) \
|
||||||
prune_shared_branch(PRUNE_CP); \
|
prune_shared_branch(PRUNE_CP); \
|
||||||
PRUNE_CP = Get_LOCAL_top_cp(); \
|
PRUNE_CP = Get_LOCAL_top_cp(); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CUT_wait_leftmost() \
|
#define CUT_wait_leftmost() \
|
||||||
if (GLOBAL_parallel_mode == PARALLEL_MODE_RUNNING) { \
|
if (GLOBAL_parallel_mode == PARALLEL_MODE_RUNNING) { \
|
||||||
|
16
configure
vendored
16
configure
vendored
@ -7511,21 +7511,21 @@ if test "$threads" = "yes"
|
|||||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||||
as_fn_error "--or-parallelism=sba incompatible with threads
|
as_fn_error "--or-parallelism=sba incompatible with threads
|
||||||
;;
|
|
||||||
a-cow
|
|
||||||
See \`config.log' for more details." "$LINENO" 5; }
|
See \`config.log' for more details." "$LINENO" 5; }
|
||||||
|
;;
|
||||||
|
a-cow)
|
||||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||||
as_fn_error "--or-parallelism=a-cow incompatible with threads
|
as_fn_error "--or-parallelism=a-cow incompatible with threads
|
||||||
;;
|
|
||||||
copy
|
|
||||||
See \`config.log' for more details." "$LINENO" 5; }
|
See \`config.log' for more details." "$LINENO" 5; }
|
||||||
|
;;
|
||||||
|
copy)
|
||||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||||
as_fn_error "--or-parallelism=copy incompatible with threads
|
as_fn_error "--or-parallelism=copy incompatible with threads
|
||||||
;;
|
|
||||||
yes|threads
|
|
||||||
See \`config.log' for more details." "$LINENO" 5; }
|
See \`config.log' for more details." "$LINENO" 5; }
|
||||||
|
;;
|
||||||
|
yes|threads)
|
||||||
YAP_EXTRAS="$YAP_EXTRAS -DYAPOR_THREADS=1"
|
YAP_EXTRAS="$YAP_EXTRAS -DYAPOR_THREADS=1"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -10619,8 +10619,8 @@ esac
|
|||||||
|
|
||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
# Files that config.status was made for.
|
# Files that config.status was made for.
|
||||||
config_files="$ac_config_files"
|
config_files="`echo $ac_config_files`"
|
||||||
config_headers="$ac_config_headers"
|
config_headers="`echo $ac_config_headers`"
|
||||||
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
|
@ -1321,15 +1321,15 @@ if test "$threads" = "yes"
|
|||||||
case "$orparallelism" in
|
case "$orparallelism" in
|
||||||
sba)
|
sba)
|
||||||
AC_MSG_FAILURE(
|
AC_MSG_FAILURE(
|
||||||
[--or-parallelism=sba incompatible with threads]
|
[--or-parallelism=sba incompatible with threads])
|
||||||
;;
|
;;
|
||||||
a-cow)
|
a-cow)
|
||||||
AC_MSG_FAILURE(
|
AC_MSG_FAILURE(
|
||||||
[--or-parallelism=a-cow incompatible with threads]
|
[--or-parallelism=a-cow incompatible with threads])
|
||||||
;;
|
;;
|
||||||
copy)
|
copy)
|
||||||
AC_MSG_FAILURE(
|
AC_MSG_FAILURE(
|
||||||
[--or-parallelism=copy incompatible with threads]
|
[--or-parallelism=copy incompatible with threads])
|
||||||
;;
|
;;
|
||||||
yes|threads)
|
yes|threads)
|
||||||
YAP_EXTRAS="$YAP_EXTRAS -DYAPOR_THREADS=1"
|
YAP_EXTRAS="$YAP_EXTRAS -DYAPOR_THREADS=1"
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit b1c05f2dfba27286d3810c6921d027cecd528b01
|
Subproject commit d41891071193a6c9d20b30bdbe709531948e111b
|
Reference in New Issue
Block a user