[FFmpeg-devel] [PATCH 2/2] tests/dnn/dnn-layer-mathunary-test: add unit test for exp

Guo, Yejun yejun.guo at intel.com
Wed Mar 24 04:04:28 EET 2021



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> Wenlong Ding
> Sent: 2021年3月22日 16:20
> To: ffmpeg-devel at ffmpeg.org
> Cc: Ding, Wenlong <wenlong.ding at intel.com>
> Subject: [FFmpeg-devel] [PATCH 2/2] tests/dnn/dnn-layer-mathunary-test: add
> unit test for exp
> 
> Signed-off-by: Wenlong Ding <wenlong.ding at intel.com>
> ---
>  tests/dnn/dnn-layer-mathunary-test.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tests/dnn/dnn-layer-mathunary-test.c
> b/tests/dnn/dnn-layer-mathunary-test.c
> index a8c5ab0224..0d81f582f9 100644
> --- a/tests/dnn/dnn-layer-mathunary-test.c
> +++ b/tests/dnn/dnn-layer-mathunary-test.c
> @@ -62,6 +62,8 @@ static float get_expected(float f,
> DNNMathUnaryOperation op)
>          return floor(f);
>      case DMUO_ROUND:
>          return round(f);
> +    case DMUO_EXP:
> +	return exp(f);
>      default:
>          av_assert0(!"not supported yet");
>          return 0.f;
> @@ -140,5 +142,7 @@ int main(int agrc, char **argv)
>          return 1;
>      if (test(DMUO_ROUND))
>          return 1;
> +    if (test(DMUO_EXP))
> +	return 1;
>      return 0;
>  }
> --

LGTM, will push soon, thanks.



More information about the ffmpeg-devel mailing list