Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
6da812e4
Commit
6da812e4
authored
Jul 03, 2011
by
Mans Rullgard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eval: make timing optional in test program
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
84757de0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
eval.c
libavutil/eval.c
+9
-4
No files found.
libavutil/eval.c
View file @
6da812e4
...
@@ -533,6 +533,8 @@ int av_expr_parse_and_eval(double *d, const char *s,
...
@@ -533,6 +533,8 @@ int av_expr_parse_and_eval(double *d, const char *s,
#ifdef TEST
#ifdef TEST
#undef printf
#undef printf
#include <string.h>
static
double
const_values
[]
=
{
static
double
const_values
[]
=
{
M_PI
,
M_PI
,
M_E
,
M_E
,
...
@@ -545,7 +547,7 @@ static const char *const_names[] = {
...
@@ -545,7 +547,7 @@ static const char *const_names[] = {
0
0
};
};
int
main
(
void
)
int
main
(
int
argc
,
char
**
argv
)
{
{
int
i
;
int
i
;
double
d
;
double
d
;
...
@@ -617,13 +619,16 @@ int main(void)
...
@@ -617,13 +619,16 @@ int main(void)
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
0
,
NULL
);
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
0
,
NULL
);
printf
(
"%f == 0.931322575
\n
"
,
d
);
printf
(
"%f == 0.931322575
\n
"
,
d
);
for
(
i
=
0
;
i
<
1050
;
i
++
)
{
if
(
argc
>
1
&&
!
strcmp
(
argv
[
1
],
"-t"
))
{
START_TIMER
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)"
,
av_expr_parse_and_eval
(
&
d
,
"1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)"
,
const_names
,
const_values
,
const_names
,
const_values
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
0
,
NULL
);
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
0
,
NULL
);
STOP_TIMER
(
"av_expr_parse_and_eval"
)
STOP_TIMER
(
"av_expr_parse_and_eval"
);
}
}
}
return
0
;
return
0
;
}
}
#endif
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment