mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
0b6d3f0d83
commit
3f7c5a375b
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue