本文整理汇总了C++中TraceFunctionParam函数的典型用法代码示例。如果您正苦于以下问题:C++ TraceFunctionParam函数的具体用法?C++ TraceFunctionParam怎么用?C++ TraceFunctionParam使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TraceFunctionParam函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: transmuting_kings_enforce_observer_walk
/* Make sure to behave correctly while detecting observations by vaulting kings
*/
boolean transmuting_kings_enforce_observer_walk(slice_index si)
{
boolean result;
square const sq_king = being_solved.king_square[trait[nbply]];
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
if (transmuting_kings_testing_transmutation[advers(trait[nbply])])
result = pipe_validate_observation_recursive_delegate(si);
else if (testing_with_non_transmuting_king[nbply])
{
assert(observing_walk[nbply]==get_walk_of_piece_on_square(sq_king));
if (move_generation_stack[CURRMOVE_OF_PLY(nbply)].departure==sq_king)
result = pipe_validate_observation_recursive_delegate(si);
else
result = false;
}
else if (move_generation_stack[CURRMOVE_OF_PLY(nbply)].departure==sq_king)
{
if (transmuting_kings_is_king_transmuting_as(observing_walk[nbply]))
{
piece_walk_type const save_walk = observing_walk[nbply];
observing_walk[nbply] = get_walk_of_piece_on_square(sq_king);
result = pipe_validate_observation_recursive_delegate(si);
observing_walk[nbply] = save_walk;
is_king_transmuting_as_observing_walk[nbply] = does_transmute;
}
else
{
result = false;
is_king_transmuting_as_observing_walk[nbply] = does_not_transmute;
}
}
else
result = pipe_validate_observation_recursive_delegate(si);
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例2: output_plaintext_tree_try_writer_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 output_plaintext_tree_try_writer_solve(slice_index si)
{
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
assert(refutations!=table_nil);
if (table_length(refutations)>0)
{
protocol_fprintf(stdout,"%s"," ?");
pipe_solve_delegate(si);
}
else
output_plaintext_tree_key_writer_solve(si);
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例3: transmuting_kings_generate_moves_for_piece
/* Generate moves for a single piece
* @param identifies generator slice
*/
void transmuting_kings_generate_moves_for_piece(slice_index si)
{
Flags const mask = BIT(trait[nbply])|BIT(Royal);
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
if (TSTFULLFLAGMASK(being_solved.spec[curr_generation->departure],mask))
{
if (!generate_moves_of_transmuting_king(si))
pipe_move_generation_delegate(si);
}
else
pipe_move_generation_delegate(si);
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例4: output_plaintext_instrument_solving_builder_solve
void output_plaintext_instrument_solving_builder_solve(slice_index si)
{
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
{
slice_index const prototypes[] = {
alloc_pipe(STOutputPlainTextInstrumentSolvers)
};
enum { nr_prototypes = sizeof prototypes / sizeof prototypes[0] };
slice_insertion_insert(si,prototypes,nr_prototypes);
}
pipe_solve_delegate(si);
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例5: init_disturb_mate_dir_knight
static void init_disturb_mate_dir_knight(square const check_from, int dir)
{
square s;
Flags const mask = BIT(Black)|BIT(Royal);
TraceFunctionEntry(__func__);
TraceFunctionParam("%d",dir);
TraceFunctionParamListEnd();
for (s = check_from; !TSTFULLFLAGMASK(being_solved.spec[s],mask); s += dir)
{
vec_index_type i;
for (i = vec_knight_start; i<=vec_knight_end; ++i)
DisturbMateDirKnight[s+vec[i]] = vec[i];
}
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例6: move_imitators
static void move_imitators(int delta)
{
unsigned int i;
TraceFunctionEntry(__func__);
TraceFunctionParam("%d",delta);
TraceFunctionParamListEnd();
TraceValue("%u",being_solved.number_of_imitators);
for (i=0; i!=being_solved.number_of_imitators; ++i)
{
being_solved.isquare[i] += delta;
TraceSquare(being_solved.isquare[i]);
}
TraceEOL();
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例7: insert_promoter
static void insert_promoter(slice_index si, stip_structure_traversal *st)
{
slice_index const * const landing = st->param;
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
{
slice_index const proxy = alloc_proxy_slice();
slice_index const prototype = alloc_fork_slice(STPawnToImitatorPromoter,proxy);
assert(*landing!=no_slice);
link_to_branch(proxy,*landing);
promotion_insert_slices(si,st->context,&prototype,1);
}
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例8: copy_shallow
/* Create a shallow copy of the visited fork slice
* @param si visited slice
* @param st structure representing the copying traversal
*/
static void copy_shallow(slice_index si, stip_structure_traversal *st)
{
stip_deep_copies_type * const copies = st->param;
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
assert((*copies)[si]==no_slice);
(*copies)[si] = copy_slice(si);
stip_traverse_structure_children_pipe(si,st);
if (SLICE_NEXT1(si)!=no_slice)
link_to_branch((*copies)[si],(*copies)[SLICE_NEXT1(si)]);
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例9: move_to_postkey
static void move_to_postkey(slice_index si, stip_structure_traversal *st)
{
slice_index * const root_slice = st->param;
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
stip_traverse_structure_children_pipe(si,st);
if (*root_slice!=no_slice)
{
link_to_branch(si,*root_slice);
*root_slice = si;
}
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例10: remove_guard
static void remove_guard(slice_index si, stip_structure_traversal *st)
{
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
stip_traverse_structure_children_pipe(si,st);
{
slice_index const guard = branch_find_slice(STSelfCheckGuard,
SLICE_NEXT2(si),
stip_traversal_context_intro);
assert(guard!=no_slice);
pipe_remove(guard);
}
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例11: intelligent_place_white_queen
void intelligent_place_white_queen(unsigned int placed_index,
square placed_on,
void (*go_on)(void))
{
piece_walk_type const placed_type = white[placed_index].type;
Flags const placed_flags = white[placed_index].flags;
square const placed_comes_from = white[placed_index].diagram_square;
int const dir_ortho = GuardDir[Rook-Pawn][placed_on].dir;
int const dir_diag = GuardDir[Bishop-Pawn][placed_on].dir;
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",placed_index);
TraceSquare(placed_on);
TraceFunctionParamListEnd();
if (dir_ortho<guard_dir_guard_uninterceptable
&& dir_diag<guard_dir_guard_uninterceptable
&& intelligent_reserve_officer_moves_from_to(White,
placed_comes_from,
placed_type,
placed_on))
{
square const target_ortho = GuardDir[Rook-Pawn][placed_on].target;
stack_elmt_type const new_top = { placed_index, placed_on, go_on, stack_top };
stack_top = &new_top;
occupy_square(placed_on,placed_type,placed_flags);
if (dir_ortho==0 || TSTFLAG(being_solved.spec[target_ortho],Black) || !is_line_empty(placed_on,target_ortho,dir_ortho))
intercept_queen_diag();
else
intelligent_intercept_guard_by_white(target_ortho,dir_ortho,&intercept_queen_diag);
assert(stack_top==&new_top);
stack_top = stack_top->next;
intelligent_unreserve();
}
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例12: patrol_validate_observation
/* Validate an observation according to Patrol Chess
* @return true iff the observation is valid
*/
boolean patrol_validate_observation(slice_index si)
{
boolean result;
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
if (TSTFLAG(being_solved.spec[move_generation_stack[CURRMOVE_OF_PLY(nbply)].departure],Patrol))
result = (is_mover_supported(CURRMOVE_OF_PLY(nbply))
&& pipe_validate_observation_recursive_delegate(si));
else
result = pipe_validate_observation_recursive_delegate(si);
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例13: vaulting_king_is_square_observed
/* Determine whether a square is observed be the side at the move according to
* Vaulting Kings
* @param si identifies next slice
* @note sets observation_validation_result
*/
void vaulting_king_is_square_observed(slice_index si)
{
Side const side_observing = trait[nbply];
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
if (being_solved.king_square[side_observing]==initsquare)
pipe_solve_delegate(si);
else
{
is_king_vaulting[nbply] = dont_know;
pipe_solve_delegate(si);
}
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例14: suspend_insertion
static void suspend_insertion(slice_index si, stip_structure_traversal *st)
{
in_branch_insertion_state_type * const state = st->param;
boolean const save_is_instrumented = state->is_branch_instrumented;
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
/* prevent instrumentation of next1 branch */
state->is_branch_instrumented = true;
stip_traverse_structure_conditional_pipe_tester(si,st);
state->is_branch_instrumented = save_is_instrumented;
stip_traverse_structure_children_pipe(si,st);
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例15: retro_instrument_solving_default
void retro_instrument_solving_default(slice_index solving_machinery)
{
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",solving_machinery);
TraceFunctionParamListEnd();
{
slice_index const protos[] = {
alloc_pipe(STRetroStartRetractionPly),
alloc_pipe(STRetroStartRetroMovePly),
alloc_pipe(STRetroPlayNullMove)
};
enum { nr_prototypes = sizeof protos / sizeof protos[0] };
slice_insertion_insert(solving_machinery,protos,nr_prototypes);
}
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}