Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTing Fu <ting.fu@intel.com>2020-06-06 15:12:47 +0300
committerGuo Yejun <yejun.guo@intel.com>2020-06-11 06:10:51 +0300
commit3f7c5a375b8e76d8ebcf6a872c8ae86734e57d0c (patch)
tree1f2ee0b207f68928a9345f99852ac6d6c406f409 /tests
parent0b6d3f0d838f1f28f30ccc25a08f539a53e58665 (diff)
dnn-layer-mathunary-test: add unit test for sin
Signed-off-by: Ting Fu <ting.fu@intel.com> Signed-off-by: Guo Yejun <yejun.guo@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/dnn/dnn-layer-mathunary-test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/dnn/dnn-layer-mathunary-test.c b/tests/dnn/dnn-layer-mathunary-test.c
index f032ca0684..ed42198195 100644
--- a/tests/dnn/dnn-layer-mathunary-test.c
+++ b/tests/dnn/dnn-layer-mathunary-test.c
@@ -32,6 +32,8 @@ static float get_expected(float f, DNNMathUnaryOperation op)
{
case DMUO_ABS:
return (f >= 0) ? f : -f;
+ case DMUO_SIN:
+ return sin(f);
default:
av_assert0(!"not supported yet");
return 0.f;
@@ -77,5 +79,7 @@ int main(int agrc, char **argv)
{
if (test(DMUO_ABS))
return 1;
+ if (test(DMUO_SIN))
+ return 1;
return 0;
}