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>
This commit is contained in:
Ting Fu 2020-06-06 20:12:47 +08:00 committed by Guo Yejun
parent 0b6d3f0d83
commit 3f7c5a375b
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}