Signed-off-by: Mans Rullgard <mans@mansr.com>
#ifdef TEST
#undef printf
#ifdef TEST
#undef printf
static double const_values[] = {
M_PI,
M_E,
static double const_values[] = {
M_PI,
M_E,
+int main(int argc, char **argv)
NULL, NULL, NULL, NULL, NULL, 0, NULL);
printf("%f == 0.931322575\n", d);
NULL, NULL, NULL, NULL, NULL, 0, NULL);
printf("%f == 0.931322575\n", d);
- for (i=0; i<1050; i++) {
- START_TIMER
+ if (argc > 1 && !strcmp(argv[1], "-t")) {
+ for (i = 0; i < 1050; i++) {
+ START_TIMER;
av_expr_parse_and_eval(&d, "1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)",
const_names, const_values,
NULL, NULL, NULL, NULL, NULL, 0, NULL);
av_expr_parse_and_eval(&d, "1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)",
const_names, const_values,
NULL, NULL, NULL, NULL, NULL, 0, NULL);
- STOP_TIMER("av_expr_parse_and_eval")
+ STOP_TIMER("av_expr_parse_and_eval");
+ }