diff mbox series

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

Message ID 20210322082012.519890-2-wenlong.ding@intel.com
State Accepted
Headers show
Series [FFmpeg-devel,1/2] lavfi/dnn/dnn_backend_native_layer_mathunary: add exp support | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Wenlong Ding March 22, 2021, 8:20 a.m. UTC
Signed-off-by: Wenlong Ding <wenlong.ding@intel.com>
---
 tests/dnn/dnn-layer-mathunary-test.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Guo, Yejun March 24, 2021, 2:04 a.m. UTC | #1
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Wenlong Ding
> Sent: 2021年3月22日 16:20
> To: ffmpeg-devel@ffmpeg.org
> Cc: Ding, Wenlong <wenlong.ding@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@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.
diff mbox series

Patch

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