本文整理汇总了C++中TraceFunctionEntry函数的典型用法代码示例。如果您正苦于以下问题:C++ TraceFunctionEntry函数的具体用法?C++ TraceFunctionEntry怎么用?C++ TraceFunctionEntry使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TraceFunctionEntry函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: stoponshortsolutions_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 stoponshortsolutions_solve(slice_index si)
{
slice_index const initialiser = SLICE_NEXT2(si);
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
if (has_short_solution_been_found_in_phase(initialiser))
solve_result = MOVE_HAS_NOT_SOLVED_LENGTH();
else
{
pipe_solve_delegate(si);
if (solve_result<=MOVE_HAS_SOLVED_LENGTH()
&& solve_nr_remaining<SLICE_U(si).branch.length)
short_solution_found(initialiser);
}
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例2: instrument_no_rebirth
static void instrument_no_rebirth(slice_index si, stip_structure_traversal *st)
{
TraceFunctionEntry(__func__);
TraceValue("%u",si);
TraceFunctionParamListEnd();
stip_traverse_structure_children(si,st);
{
slice_index const prototypes[] =
{
alloc_pipe(STMarsCirceRememberNoRebirth),
alloc_pipe(STMoveGeneratorRejectCaptures)
};
enum { nr_prototypes = sizeof prototypes / sizeof prototypes[0] };
slice_insertion_insert_contextually(si,st->context,prototypes,nr_prototypes);
}
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例3: get_goal_slice_rank
/* Determine the rank of a slice type
* @param type defense slice type
* @return rank of type; nr_defense_slice_rank_order_elmts if the rank can't
* be determined
*/
static unsigned int get_goal_slice_rank(slice_type type)
{
unsigned int result = no_goal_slice_type;
unsigned int i;
TraceFunctionEntry(__func__);
TraceEnumerator(slice_type,type,"");
TraceFunctionParamListEnd();
for (i = 0; i!=nr_goal_slice_rank_order_elmts; ++i)
if (goal_slice_rank_order[i]==type)
{
result = i;
break;
}
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例4: solving_insert_continuation_solvers
/* Instrument the solving machinery with STContinuationSolver slices
* @param root_slice root slice of the solving machinery
*/
void solving_insert_continuation_solvers(slice_index si)
{
stip_structure_traversal st;
boolean attack_played = false;
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
stip_structure_traversal_init(&st,&attack_played);
stip_structure_traversal_override_by_contextual(&st,
slice_contextual_conditional_pipe,
&stip_traverse_structure_children_pipe);
stip_structure_traversal_override(&st,
continuation_solver_inserters,
nr_continuation_solver_inserters);
stip_traverse_structure(si,&st);
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例5: is_imitator_pos_occupied
static boolean is_imitator_pos_occupied(void)
{
boolean result = false;
unsigned int i;
TraceFunctionEntry(__func__);
TraceFunctionParamListEnd();
for (i=0; i!=being_solved.number_of_imitators; ++i)
if (!is_square_empty(being_solved.isquare[i]))
{
TraceSquare(being_solved.isquare[i]);TraceEOL();
result = true;
break;
}
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例6: blackchecks_initialise_solving
/* Instrument the solving machinery for BlackChecks
* @param si identifies root slice of stipulation
*/
void blackchecks_initialise_solving(slice_index si)
{
stip_structure_traversal st;
slice_index landing = no_slice;
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
stip_structure_traversal_init(&st,&landing);
stip_structure_traversal_override_single(&st,STGoalReachedTester,&stip_structure_visitor_noop);
stip_structure_traversal_override_single(&st,STMove,&instrument_move);
stip_structure_traversal_override_single(&st,STGeneratingMoves,&instrument_move_generator);
stip_structure_traversal_override_single(&st,
STLandingAfterMovingPieceMovement,
&remember_landing);
stip_traverse_structure(si,&st);
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例7: maxsolutions_instrument_problem
/* Instrument the current problem with option maxsolutions
* @param si identifies the slice where to start instrumenting
* @param max_nr_solutions_per_phase
*/
void maxsolutions_instrument_problem(slice_index si, unsigned int i)
{
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParam("%u",i);
TraceFunctionParamListEnd();
{
slice_index const interruption = branch_find_slice(STPhaseSolvingIncomplete,
si,
stip_traversal_context_intro);
slice_index const prototype = alloc_pipe(STMaxSolutionsProblemInstrumenter);
SLICE_NEXT2(prototype) = interruption;
assert(interruption!=no_slice);
slice_insertion_insert(si,&prototype,1);
max_nr_solutions_per_phase = i;
}
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例8: is_current_move_in_table
/* Determine whether the move just played in ply nbply is in a table
* @param t table identifier
* @return true iff the move just played is in table t
*/
boolean is_current_move_in_table(table t)
{
table_position i;
boolean result = false;
TraceFunctionEntry(__func__);
TraceFunctionParamListEnd();
assert(current_position[t]>=current_position[t-1]);
for (i = current_position[t-1]+1; i<=current_position[t]; i++)
if (moves_equal(&tables_stack[i]))
{
result = true;
break;
}
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例9: constraint_tester_make_root
/* Spin a STContraintSolver slice off a STContraintTester sliceto add it to the
* root or set play branch
* @param si identifies (non-root) slice
* @param st address of structure representing traversal
*/
void constraint_tester_make_root(slice_index si, stip_structure_traversal *st)
{
spin_off_state_type * const state = st->param;
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
stip_traverse_structure_children_pipe(si,st);
if (state->spun_off[SLICE_NEXT1(si)]!=no_slice)
{
state->spun_off[si] = alloc_constraint_solver_slice(stip_deep_copy(SLICE_NEXT2(si)));
link_to_branch(state->spun_off[si],state->spun_off[SLICE_NEXT1(si)]);
}
TraceValue("%u\n",state->spun_off[si]);
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例10: genmove
static void genmove(void)
{
unsigned int i;
square square_h = square_h8;
Side const side = trait[nbply];
TraceFunctionEntry(__func__);
TraceFunctionParamListEnd();
for (i = nr_rows_on_board; i>0; i--, square_h += dir_down)
{
unsigned int j;
square sq_departure = square_h;
for (j = nr_files_on_board; j>0; j--, sq_departure += dir_left)
if (TSTFLAG(being_solved.spec[sq_departure],side))
generate_moves_for_piece(sq_departure);
}
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例11: determine_king_placement
static void determine_king_placement(Side trait_ply)
{
TraceFunctionEntry(__func__);
TraceEnumerator(Side,trait_ply,"");
TraceFunctionParamListEnd();
if (post_move_iteration_id[nbply]!=prev_post_move_iteration_id[nbply])
{
king_placement[nbply] = square_a1-1;
is_mate_square_dirty[nbply] = true;
}
if (is_mate_square_dirty[nbply])
{
advance_mate_square(trait_ply);
is_mate_square_dirty[nbply] = false;
}
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例12: instrument_generating
static void instrument_generating(slice_index si, stip_structure_traversal *st)
{
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
stip_traverse_structure_children_pipe(si,st);
{
insertion_configuration const * config = st->param;
if (config->side==nr_sides || config->side==SLICE_STARTER(si))
{
slice_index const prototype = alloc_pipe(config->type);
move_generation_branch_insert_slices_impl(si,&prototype,1,si);
dealloc_slice(prototype);
}
}
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例13: extinction_extincted_tester_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 extinction_extincted_tester_solve(slice_index si)
{
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
{
Side const side_in_check = SLICE_STARTER(si);
piece_walk_type const capturee = find_capturee();
TraceWalk(capturee);
TraceEnumerator(Side,side_in_check,"\n");
pipe_this_move_doesnt_solve_if(si,
capturee==Empty
|| being_solved.number_of_pieces[side_in_check][capturee]!=0);
}
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例14: insert_make_generator_avoid_pawn_to_baseline
static void insert_make_generator_avoid_pawn_to_baseline(slice_index si,
stip_structure_traversal *st)
{
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
stip_traverse_structure_children(si,st);
{
slice_index const prototypes[] =
{
alloc_pipe(STTakeAndMakeGenerateMake),
alloc_pipe(STTakeAndMakeAvoidPawnMakeToBaseLine),
};
slice_insertion_insert_contextually(si,st->context,prototypes,2);
}
TraceFunctionExit(__func__);
TraceFunctionResultEnd();
}
示例15: mummer_set_length_measurer
/* Activate mummer for a side and define the length measurer to be used.
* @param side Side for which to activate mummer
* @param measurer length measurer to be used
* @return false iff mummer was already activated for side
*/
boolean mummer_set_length_measurer(Side side,
mummer_length_measurer_type measurer)
{
boolean result;
TraceFunctionEntry(__func__);
TraceFunctionParamListEnd();
if (mummer_measure_length[side]==0)
{
mummer_measure_length[side] = measurer;
result = true;
}
else
result = false;
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}