redefine MAX_DEPTH as MAX_BRANCH_DEPTH to avoid conflits with yap2swi

library
This commit is contained in:
Ricardo Rocha 2009-06-24 20:00:51 +01:00
parent 3397e97732
commit 3ccad9aff2
5 changed files with 5 additions and 5 deletions

View File

@ -17,7 +17,7 @@
** default sizes ** ** default sizes **
** ----------------------- */ ** ----------------------- */
#define MAX_LENGTH_ANSWER 500 #define MAX_LENGTH_ANSWER 500
#define MAX_DEPTH 1000 #define MAX_BRANCH_DEPTH 1000
#define MAX_BEST_TIMES 21 #define MAX_BEST_TIMES 21
#define MAX_TABLE_VARS 100 #define MAX_TABLE_VARS 100
#define TABLE_LOCK_BUCKETS 512 #define TABLE_LOCK_BUCKETS 512

View File

@ -158,7 +158,7 @@ struct global_data{
volatile bitmap pruning_workers; volatile bitmap pruning_workers;
#endif /* TABLING_INNER_CUTS */ #endif /* TABLING_INNER_CUTS */
struct global_locks locks; struct global_locks locks;
volatile unsigned int branch[MAX_WORKERS][MAX_DEPTH]; volatile unsigned int branch[MAX_WORKERS][MAX_BRANCH_DEPTH];
volatile char parallel_execution_mode; /* TRUE / FALSE */ volatile char parallel_execution_mode; /* TRUE / FALSE */
volatile int answers; volatile int answers;
#endif /* YAPOR */ #endif /* YAPOR */

View File

@ -204,7 +204,7 @@ void share_private_nodes(int worker_q) {
OrFr_nearest_livenode(previous_or_frame) = OrFr_next(previous_or_frame) = or_frame; OrFr_nearest_livenode(previous_or_frame) = OrFr_next(previous_or_frame) = or_frame;
} }
/* update depth */ /* update depth */
if (depth >= MAX_DEPTH) if (depth >= MAX_BRANCH_DEPTH)
Yap_Error(INTERNAL_ERROR, TermNil, "maximum depth exceded (share_private_nodes)"); Yap_Error(INTERNAL_ERROR, TermNil, "maximum depth exceded (share_private_nodes)");
or_frame = B->cp_or_fr; or_frame = B->cp_or_fr;
while (or_frame != LOCAL_top_or_fr) { while (or_frame != LOCAL_top_or_fr) {

View File

@ -587,7 +587,7 @@ void share_private_nodes(int worker_q) {
#endif /* TABLING */ #endif /* TABLING */
/* update depth */ /* update depth */
if (depth >= MAX_DEPTH) if (depth >= MAX_BRANCH_DEPTH)
Yap_Error(INTERNAL_ERROR, TermNil, "maximum depth exceded (share_private_nodes)"); Yap_Error(INTERNAL_ERROR, TermNil, "maximum depth exceded (share_private_nodes)");
or_frame = B->cp_or_fr; or_frame = B->cp_or_fr;
#ifdef TABLING #ifdef TABLING

View File

@ -269,7 +269,7 @@ void share_private_nodes(int worker_q) {
OrFr_nearest_livenode(previous_or_frame) = OrFr_next(previous_or_frame) = or_frame; OrFr_nearest_livenode(previous_or_frame) = OrFr_next(previous_or_frame) = or_frame;
} }
/* update depth */ /* update depth */
if (depth >= MAX_DEPTH) if (depth >= MAX_BRANCH_DEPTH)
Yap_Error(INTERNAL_ERROR, TermNil, "maximum depth exceded (share_private_nodes)"); Yap_Error(INTERNAL_ERROR, TermNil, "maximum depth exceded (share_private_nodes)");
or_frame = B->cp_or_fr; or_frame = B->cp_or_fr;