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
93bf1dca
Commit
93bf1dca
authored
Sep 13, 2018
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checkasm/float_dsp: add test for vector_dmul
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
1b98bfb9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
float_dsp.c
tests/checkasm/float_dsp.c
+24
-0
No files found.
tests/checkasm/float_dsp.c
View file @
93bf1dca
...
...
@@ -61,6 +61,28 @@ static void test_vector_fmul(const float *src0, const float *src1)
bench_new
(
odst
,
src0
,
src1
,
LEN
);
}
static
void
test_vector_dmul
(
const
double
*
src0
,
const
double
*
src1
)
{
LOCAL_ALIGNED_32
(
double
,
cdst
,
[
LEN
]);
LOCAL_ALIGNED_32
(
double
,
odst
,
[
LEN
]);
int
i
;
declare_func
(
void
,
double
*
dst
,
const
double
*
src0
,
const
double
*
src1
,
int
len
);
call_ref
(
cdst
,
src0
,
src1
,
LEN
);
call_new
(
odst
,
src0
,
src1
,
LEN
);
for
(
i
=
0
;
i
<
LEN
;
i
++
)
{
if
(
!
double_near_abs_eps
(
cdst
[
i
],
odst
[
i
],
DBL_EPSILON
))
{
fprintf
(
stderr
,
"%d: %- .12f - %- .12f = % .12g
\n
"
,
i
,
cdst
[
i
],
odst
[
i
],
cdst
[
i
]
-
odst
[
i
]);
fail
();
break
;
}
}
bench_new
(
odst
,
src0
,
src1
,
LEN
);
}
#define ARBITRARY_FMUL_ADD_CONST 0.005
static
void
test_vector_fmul_add
(
const
float
*
src0
,
const
float
*
src1
,
const
float
*
src2
)
{
...
...
@@ -294,6 +316,8 @@ void checkasm_check_float_dsp(void)
if
(
check_func
(
fdsp
->
vector_fmac_scalar
,
"vector_fmac_scalar"
))
test_vector_fmac_scalar
(
src0
,
src1
,
src2
);
report
(
"vector_fmac"
);
if
(
check_func
(
fdsp
->
vector_dmul
,
"vector_dmul"
))
test_vector_dmul
(
dbl_src0
,
dbl_src1
);
if
(
check_func
(
fdsp
->
vector_dmul_scalar
,
"vector_dmul_scalar"
))
test_vector_dmul_scalar
(
dbl_src0
,
dbl_src1
);
report
(
"vector_dmul"
);
...
...
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