本文整理汇总了C++中TraceValue函数的典型用法代码示例。如果您正苦于以下问题:C++ TraceValue函数的具体用法?C++ TraceValue怎么用?C++ TraceValue使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TraceValue函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: are_all_imitator_lines_clear
static boolean are_all_imitator_lines_clear(numvec diff_first_necessarily_empty,
numvec step,
numvec diff_first_not_necessarily_empty)
{
boolean result = true;
unsigned int i;
TraceFunctionEntry(__func__);
TraceValue("%d",diff_first_necessarily_empty);
TraceValue("%d",step);
TraceValue("%d",diff_first_not_necessarily_empty);
TraceFunctionParamListEnd();
TraceValue("%u\n",being_solved.number_of_imitators);
for (i = 0; i!=being_solved.number_of_imitators; ++i)
if (!is_imitator_line_clear(i,diff_first_necessarily_empty,step,diff_first_not_necessarily_empty))
{
result = false;
break;
}
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例2: goalreachable_guard_mate_solve
/* Try to solve in solve_nr_remaining half-moves.
* @param si slice index
* @note assigns solve_result the length of solution found and written, i.e.:
* previous_move_is_illegal the move just played is illegal
* this_move_is_illegal the move being played is illegal
* immobility_on_next_move the moves just played led to an
* unintended immobility on the next move
* <=n+1 length of shortest solution found (n+1 only if in next
* branch)
* n+2 no solution found in this branch
* n+3 no solution found in next branch
* (with n denominating solve_nr_remaining)
*/
void goalreachable_guard_mate_solve(slice_index si)
{
Side const just_moved = advers(SLICE_STARTER(si));
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
--MovesLeft[just_moved];
TraceEnumerator(Side,SLICE_STARTER(si));
TraceEnumerator(Side,just_moved);
TraceValue("%u",MovesLeft[SLICE_STARTER(si)]);
TraceValue("%u",MovesLeft[just_moved]);
TraceEOL();
pipe_this_move_doesnt_solve_if(si,!mate_isGoalReachable());
++MovesLeft[just_moved];
TraceValue("%u",MovesLeft[SLICE_STARTER(si)]);
TraceValue("%u",MovesLeft[just_moved]);
TraceEOL();
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例3: siblingply
/* Start a new ply as a sibling of the current ply, making the child the new
* current ply
* @param side the side at the move in the child ply
*/
void siblingply(Side side)
{
ply const elder = nbply;
TraceFunctionEntry(__func__);
TraceFunctionParamListEnd();
assert(ply_watermark<maxply);
ply_stack[ply_stack_pointer++] = nbply;
nbply = ply_watermark+1;
current_move[nbply] = current_move[ply_watermark];
current_move_id[nbply] = current_move_id[ply_watermark];
++ply_watermark;
TraceValue("%u",elder);
TraceValue("%u",nbply);
TraceEOL();
parent_ply[nbply] = parent_ply[elder];
trait[nbply] = side;
move_effect_journal_base[nbply+1] = move_effect_journal_base[nbply];
en_passant_top[nbply] = en_passant_top[nbply-1];
promotion_horizon[nbply] = move_effect_journal_base[nbply];
post_move_iteration_init_ply();
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例4: square_observation_post_move_iterator_solve
/* Iterate if square observation testing uses a post-move iterating slice (e.g.
* for MarsCirce Super)
* @param si identifies move generator slice
*/
void square_observation_post_move_iterator_solve(slice_index si)
{
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
++current_level;
TraceValue("%u",current_level);TraceEOL();
if (current_level>iteration_level)
{
iteration_level = current_level;
TraceValue("%u",iteration_level);TraceValue("%u",current_level);TraceEOL();
}
do
{
pipe_is_square_observed_delegate(si);
} while (iteration_level>current_level && !observation_result);
--current_level;
TraceValue("%u",current_level);TraceEOL();
post_move_iteration_cancel();
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例5: PushMagicViews
static void PushMagicViews(void)
{
TraceFunctionEntry(__func__);
TraceFunctionParamListEnd();
magic_views_top[stack_pointer] = magic_views_top[stack_pointer-1];
siblingply(no_side);
push_observation_target(initsquare);
prev_observation_context[nbply] = observation_context;
are_we_finding_magic_views[nbply] = true;
PushMagicViewsByOneSide(White);
PushMagicViewsByOneSide(Black);
are_we_finding_magic_views[nbply] = false;
/* TODO: remove double views by neutral magic pieces
* apply same logic as for cross-eyed pieces? */
finply();
TraceValue("%u",nbply);
TraceValue("%u\n",magic_views_top[nbply]);
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例6: PushMagicView
static void PushMagicView(square pos_viewed, square pos_magic, square start, square end)
{
unsigned int const top = magic_views_top[stack_pointer];
TraceFunctionEntry(__func__);
TraceSquare(pos_viewed);
TraceSquare(pos_magic);
TraceSquare(start);
TraceSquare(end);
TraceFunctionParamListEnd();
assert(magic_views_top[stack_pointer]<magicviews_size);
magicviews[top].pos_viewed = pos_viewed;
magicviews[top].viewedid = GetPieceId(being_solved.spec[pos_viewed]);
magicviews[top].magicpieceid = GetPieceId(being_solved.spec[pos_magic]);
magicviews[top].line_start = start;
magicviews[top].line_end = end;
++magic_views_top[stack_pointer];
TraceValue("%u",stack_pointer);
TraceValue("%u\n",magic_views_top[stack_pointer]);
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例7: remember_previous_move_as_undecidable
static void remember_previous_move_as_undecidable(void)
{
append_to_table(exclusive_chess_undecidable_continuations[parent_ply[nbply]]);
TraceValue("%u",nbply);
TraceValue("%u",parent_ply[nbply]);
TraceValue("%u\n",table_length(exclusive_chess_undecidable_continuations[parent_ply[nbply]]));
}
示例8: is_imitator_line_clear
static boolean is_imitator_line_clear(unsigned int i,
numvec diff_first_necessarily_empty,
numvec step,
numvec diff_first_not_necessarily_empty)
{
boolean result = true;
square const sq_first_not_necessarily_empty = being_solved.isquare[i]+diff_first_not_necessarily_empty;
square sq_curr;
TraceFunctionEntry(__func__);
TraceValue("%u",i);
TraceValue("%d",diff_first_necessarily_empty);
TraceValue("%d",step);
TraceValue("%d",diff_first_not_necessarily_empty);
TraceFunctionParamListEnd();
for (sq_curr = being_solved.isquare[i]+diff_first_necessarily_empty; sq_curr!=sq_first_not_necessarily_empty; sq_curr += step)
{
TraceSquare(sq_curr);TraceEOL();
if (!is_square_empty(sq_curr))
{
result = false;
break;
}
}
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例9: substitute_deadend_goal
static void substitute_deadend_goal(slice_index si, stip_moves_traversal *st)
{
optimisation_state * const state = st->param;
slice_index const save_optimisable_deadend = state->optimisable_deadend;
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
stip_traverse_moves_children(si,st);
TraceValue("%u",state->optimisable_deadend);
TraceValue("%u",state->end_of_branch_goal);
TraceValue("%u\n",st->context);
if (state->optimisable_deadend!=no_slice
&& state->end_of_branch_goal!=no_slice
&& st->context!=stip_traversal_context_attack)
{
slice_index const prototype = alloc_pipe(STDeadEndGoal);
defense_branch_insert_slices(si,&prototype,1);
pipe_remove(state->optimisable_deadend);
}
state->optimisable_deadend = save_optimisable_deadend;
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例10: marscirce_is_square_observed
/* Determine whether a specific piece delivers check to a specific side
* @param observer_origin potentially delivering check ...
* @note the piece on pos_checking must belong to advers(side)
* @note sets observation_result
*/
void marscirce_is_square_observed(slice_index si)
{
circe_rebirth_context_elmt_type * const context = &circe_rebirth_context_stack[circe_rebirth_context_stack_pointer-1];
square const sq_target = move_generation_stack[CURRMOVE_OF_PLY(nbply)].capture;
TraceFunctionEntry(__func__);
TraceValue("%u",si);
TraceFunctionParamListEnd();
assert(circe_rebirth_context_stack_pointer>0);
observation_result = false;
if (observing_walk[nbply]<Queen || observing_walk[nbply]>Bishop
|| CheckDir[observing_walk[nbply]][sq_target-context->rebirth_square]!=0)
{
if (is_square_empty(context->rebirth_square))
{
TraceSquare(context->rebirth_square);
TraceWalk(context->reborn_walk);
TraceValue("%u",TSTFLAG(being_solved.spec[context->rebirth_square],White));
TraceValue("%u",TSTFLAG(being_solved.spec[context->rebirth_square],Black));
TraceEOL();
occupy_square(context->rebirth_square,context->reborn_walk,context->reborn_spec);
pipe_is_square_observed_delegate(si);
empty_square(context->rebirth_square);
}
}
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例11: ohneschach_stop_if_check_plan_to_optimise_away_stop
/* Plan optimising away a STOhneschachStopIfCheckAndNotMate slice
* @param stop identifies STOhneschachStopIfCheckAndNotMate slice
* @param to_be_optimised true iff stop is going to be optimised away
*/
void ohneschach_stop_if_check_plan_to_optimise_away_stop(slice_index stop,
boolean to_be_optimised)
{
slice_index const immobility_tester = SLICE_NEXT2(stop);
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",stop);
TraceFunctionParam("%u",to_be_optimised);
TraceFunctionParamListEnd();
TraceValue("%u",fate[immobility_tester]);
TraceEOL();
if (to_be_optimised)
{
fate[stop] = fate_stop_to_be_optimised;
if (fate[immobility_tester]==fate_dont_know)
fate[immobility_tester] = fate_immobility_tester_obsolete;
}
else
{
fate[stop] = fate_stop_not_to_be_optimised;
fate[immobility_tester] = fate_immobility_tester_still_used;
}
TraceValue("->%u",fate[immobility_tester]);
TraceEOL();
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例12: imitator_pawn_promoter_solve
/* Try to solve in solve_nr_remaining half-moves.
* @param si slice index
* @note assigns solve_result the length of solution found and written, i.e.:
* previous_move_is_illegal the move just played is illegal
* this_move_is_illegal the move being played is illegal
* immobility_on_next_move the moves just played led to an
* unintended immobility on the next move
* <=n+1 length of shortest solution found (n+1 only if in next
* branch)
* n+2 no solution found in this branch
* n+3 no solution found in next branch
* (with n denominating solve_nr_remaining)
*/
void imitator_pawn_promoter_solve(slice_index si)
{
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
{
square sq_arrival;
Side as_side;
find_potential_promotion_square(promotion_horizon[nbply],&sq_arrival,&as_side);
assert(stack_pointer<stack_size);
if (post_move_iteration_id[nbply]!=prev_post_move_iteration_id[stack_pointer])
promotion_into_imitator[stack_pointer] = is_square_occupied_by_promotable_pawn(sq_arrival,as_side);
TraceValue("%u",post_move_iteration_id[nbply]);
TraceValue("%u",prev_post_move_iteration_id[stack_pointer]);
TraceValue("%u\n",promotion_into_imitator[stack_pointer]);
if (promotion_into_imitator[stack_pointer])
{
move_effect_journal_index_type const save_horizon = promotion_horizon[nbply];
promotion_horizon[nbply] = move_effect_journal_base[nbply+1];
move_effect_journal_do_piece_removal(move_effect_reason_pawn_promotion,
sq_arrival);
move_effect_journal_do_imitator_addition(move_effect_reason_pawn_promotion,
sq_arrival);
++stack_pointer;
fork_solve_delegate(si);
--stack_pointer;
promotion_horizon[nbply] = save_horizon;
TraceValue("%u\n",post_move_iteration_locked[nbply]);
if (!post_move_iteration_locked[nbply])
{
promotion_into_imitator[stack_pointer] = false;
lock_post_move_iterations();
}
}
else
{
++stack_pointer;
pipe_solve_delegate(si);
--stack_pointer;
}
prev_post_move_iteration_id[stack_pointer] = post_move_iteration_id[nbply];
}
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例13: lock_post_move_iterations
/* Lock post move iterations in the current move retraction
*/
void lock_post_move_iterations(void)
{
TraceFunctionEntry(__func__);
TraceFunctionParamListEnd();
post_move_iteration_locked[nbply] = true;
++post_move_iteration_id[nbply];
TraceValue("%u",nbply);TraceValue("%u\n",post_move_iteration_id[nbply]);
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例14: post_move_iteration_ply_was_ended
boolean post_move_iteration_ply_was_ended(void)
{
boolean result = iteration_level==current_level;
TraceFunctionEntry(__func__);
TraceFunctionParamListEnd();
TraceValue("%u",iteration_level);TraceValue("%u",current_level);TraceEOL();
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例15: post_move_have_i_lock
/* Determine whether the current post move iteration participant has the lock
* @param true iff it has
*/
boolean post_move_have_i_lock(void)
{
boolean const result = iteration_level==current_level+1;
TraceFunctionEntry(__func__);
TraceFunctionParamListEnd();
TraceValue("%u",iteration_level);TraceValue("%u",current_level);TraceEOL();
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}