// Measure and return the overhead (in ticks) of running an empty benchmark case. static double measure_call_overhead( StopwatchType& stopwatch, const BenchmarkParams& params) { auto_ptr<IBenchmarkCase> empty_case(new EmptyBenchmarkCase()); return measure_iteration_runtime(empty_case.get(), stopwatch, params); }
// Measure and return the overhead (in ticks) of running an empty benchmark case. static double measure_call_overhead_ticks( StopwatchType& stopwatch, const size_t measurement_count) { unique_ptr<IBenchmarkCase> empty_case(new EmptyBenchmarkCase()); return measure_runtime( empty_case.get(), stopwatch, BenchmarkSuite::Impl::measure_runtime_ticks, measurement_count); }
int same_tree(struct node* ptreea, struct node* ptreeb) { int result = empty_case(ptreea, ptreeb); /* checks the empty tree case */ if (result == TRUE || result == FALSE) return result; /* result continue: check root data and then subtrees */ if (ptreea->data != ptreeb->data) return FALSE; if (same_tree(ptreea->left, ptreeb->left) && same_tree(ptreea->right, ptreeb->right)) return TRUE; return FALSE; }