本文整理汇总了C++中TraceFunctionResult函数的典型用法代码示例。如果您正苦于以下问题:C++ TraceFunctionResult函数的具体用法?C++ TraceFunctionResult怎么用?C++ TraceFunctionResult使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TraceFunctionResult函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: alloc_killer_attack_collector_slice
/* Allocate a STKillerAttackCollector slice.
* @return index of allocated slice
*/
slice_index alloc_killer_attack_collector_slice(void)
{
slice_index result;
TraceFunctionEntry(__func__);
TraceFunctionParamListEnd();
result = alloc_pipe(STKillerAttackCollector);
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例2: alloc_maxsolutions_guard_slice
/* Allocate a STMaxSolutionsGuard slice.
* @return allocated slice
*/
slice_index alloc_maxsolutions_guard_slice(void)
{
slice_index result;
TraceFunctionEntry(__func__);
TraceFunctionParamListEnd();
result = alloc_pipe(STMaxSolutionsGuard);
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例3: alloc_find_defense_slice
/* Allocate a STFindDefense slice.
* @return index of allocated slice
*/
slice_index alloc_find_defense_slice(void)
{
slice_index result;
TraceFunctionEntry(__func__);
TraceFunctionParamListEnd();
result = alloc_pipe(STFindDefense);
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例4: TraceFunctionEntry
/* Parse a stipulation branch
* @param tok input token
* @param start index of entry into solving machinery
* @param proxy index of branch; no_slice if branch couldn't be
* parsed
* @param level nesting level of the operand (0 means top level)
* @return remainder of input token; 0 if parsing failed
*/
static char *ParseStructuredStip_branch(char *tok,
slice_index start,
slice_index proxy,
expression_type *type,
unsigned int level)
{
stip_length_type min_length = 0;
stip_length_type max_length = 0;
TraceFunctionEntry(__func__);
TraceFunctionParam("%s",tok);
TraceFunctionParam("%u",start);
TraceFunctionParam("%u",proxy);
TraceFunctionParam("%u",level);
TraceFunctionParamListEnd();
tok = ParseStructuredStip_branch_length(tok,&min_length,&max_length);
switch (tolower(tok[0]))
{
case 'd':
*type = expression_type_defense;
tok = ParseStructuredStip_branch_d(tok+1,min_length,max_length,start,proxy,level);
break;
case 's':
*type = expression_type_attack;
tok = ParseStructuredStip_branch_s(tok+1,min_length,max_length,start,proxy,level);
break;
case 'a':
*type = expression_type_attack;
tok = ParseStructuredStip_branch_a(tok+1,min_length,max_length,start,proxy,level);
break;
case 'h':
*type = expression_type_attack;
tok = ParseStructuredStip_branch_h(tok+1,min_length,max_length,start,proxy,level);
break;
default:
break;
}
TraceFunctionExit(__func__);
TraceFunctionResult("%s",tok);
TraceFunctionResultEnd();
return tok;
}
示例5: intelligent_stalemate_immobilise_black
/* @return true iff >=1 black pieces needed to be immobilised
*/
boolean intelligent_stalemate_immobilise_black(void)
{
boolean result = false;
immobilisation_state_type immobilisation_state = null_state;
castling_rights_type const save_castling_flag = being_solved.castling_rights;
TraceFunctionEntry(__func__);
TraceFunctionParamListEnd();
/* we temporarily disable Black castling for two reasons:
* 1. we are solving from the target position here where king or rook may be
* at different positions than in the diagram; attempting to generate
* (let alone) execute castling moves would cause problems in this case
* 2. castlings are presumable never the only legal black moves
*/
CLRCASTLINGFLAGMASK(Black,k_cancastle);
current_state = &immobilisation_state;
conditional_pipe_solve_delegate(current_start_slice);
next_trouble_maker();
current_state = 0;
being_solved.castling_rights = save_castling_flag;
if (immobilisation_state.worst.requirement>no_requirement)
{
assert(immobilisation_state.worst.target_square!=initsquare);
TraceSquare(immobilisation_state.worst.target_square);
TraceValue("%u",immobilisation_state.worst.requirement);
TraceValue("%u\n",immobilisation_state.worst.nr_flight_directions);
if (immobilisation_state.worst.requirement<immobilisation_impossible)
{
intelligent_stalemate_pin_black_piece(immobilisation_state.worst.target_square);
if (immobilisation_state.worst.requirement<pin_required
&& can_we_block_all_necessary_squares(&immobilisation_state.worst))
block_squares(&immobilisation_state.worst);
}
result = true;
}
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例6: alloc_goal_immobile_reached_tester_system
/* Allocate a system of slices that tests whether the side to be immobilised has
* been
* @return index of entry slice
*/
slice_index alloc_goal_immobile_reached_tester_system(void)
{
slice_index result;
TraceFunctionEntry(__func__);
TraceFunctionParamListEnd();
result = alloc_goal_immobile_reached_tester_slice(goal_applies_to_starter);
pipe_link(result,alloc_true_slice());
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例7: alloc_stoponshortsolutions_filter
/* Allocate a STStopOnShortSolutionsFilter slice.
* @param length full length
* @param length minimum length
* @return allocated slice
*/
slice_index alloc_stoponshortsolutions_filter(stip_length_type length,
stip_length_type min_length)
{
slice_index result;
TraceFunctionEntry(__func__);
TraceFunctionParamListEnd();
result = alloc_branch(STStopOnShortSolutionsFilter,length,min_length);
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例8: alloc_goal_constraint_tester_slice
/* Allocate a STGoalConstraintTester slice
* @param proxy_to_constraint prototype of slice that must not be solvable
* @return index of allocated slice
*/
slice_index alloc_goal_constraint_tester_slice(slice_index proxy_to_constraint)
{
slice_index result;
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",proxy_to_constraint);
TraceFunctionParamListEnd();
result = alloc_conditional_pipe(STGoalConstraintTester,proxy_to_constraint);
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例9: alloc_goal_check_reached_tester_slice
/* Allocate a STGoalCheckReachedTester slice.
* @param starter_or_adversary is the starter or its adversary to be in check?
* @return index of allocated slice
*/
slice_index alloc_goal_check_reached_tester_slice(goal_applies_to_starter_or_adversary starter_or_adversary)
{
slice_index result;
TraceFunctionEntry(__func__);
TraceFunctionParamListEnd();
result = alloc_pipe(STGoalCheckReachedTester);
SLICE_U(result).goal_filter.applies_to_who = starter_or_adversary;
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例10: fork_validate_observation_recursive_delegate
/* Delegate validating to next2
* @param si identifies the fork
* @return true iff the observation is valid
*/
boolean fork_validate_observation_recursive_delegate(slice_index si)
{
boolean result;
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
result = validate_observation_recursive(SLICE_NEXT2(si));
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例11: alloc_null_move_player_slice
/* Allocate a STNullMovePlayer slice.
* @param after_move identifies landing slice after move playing
* @return index of allocated slice
*/
static slice_index alloc_null_move_player_slice(slice_index after_move)
{
slice_index result;
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",after_move);
TraceFunctionParamListEnd();
result = alloc_fork_slice(STNullMovePlayer,after_move);
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例12: alloc_doublemate_filter_slice
/* Allocate a STDoubleMateFilter slice.
* @return index of allocated slice
*/
slice_index alloc_doublemate_filter_slice(void)
{
slice_index result;
TraceFunctionEntry(__func__);
TraceFunctionParamListEnd();
result = alloc_conditional_pipe(STDoubleMateFilter,
alloc_goal_immobile_reached_tester_system());
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例13: alloc_constraint_solver_slice
/* Allocate a STConstraintSolver slice
* @param proxy_to_constraint prototype of slice that must not be solvable
* @return index of allocated slice
*/
slice_index alloc_constraint_solver_slice(slice_index proxy_to_constraint)
{
slice_index result;
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",proxy_to_constraint);
TraceFunctionParamListEnd();
result = alloc_fork_slice(STConstraintSolver,proxy_to_constraint);
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例14: fork_is_square_observed_nested_delegate
/* Delegate testing observation to next2
* @param si identifies the fork
* @return true iff the target square is observed
*/
boolean fork_is_square_observed_nested_delegate(slice_index si,
validator_id evaluate)
{
boolean result;
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",si);
TraceFunctionParamListEnd();
result = is_square_observed_nested(SLICE_NEXT2(si),evaluate);
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}
示例15: alloc_maxthreatlength_guard
/* Allocate a STMaxThreatLength slice
*/
static slice_index alloc_maxthreatlength_guard(slice_index threat_start)
{
slice_index result;
TraceFunctionEntry(__func__);
TraceFunctionParam("%u",threat_start);
TraceFunctionParamListEnd();
result = alloc_testing_pipe(STMaxThreatLength);
SLICE_NEXT2(result) = threat_start;
TraceFunctionExit(__func__);
TraceFunctionResult("%u",result);
TraceFunctionResultEnd();
return result;
}