aboutsummaryrefslogtreecommitdiff
path: root/tests/dnn
diff options
context:
space:
mode:
authorMingyu Yin2020-08-23 23:12:13 +0800
committerGuo, Yejun2020-08-24 09:09:11 +0800
commit3477feb6431c1d437acac7b845bb3427ef165d45 (patch)
treebb632a58d0b1026e853654eaab4590a62794e54e /tests/dnn
parent37ef1acedb27e037e394600272317fdafa448743 (diff)
dnn_backend_native_layer_mathbinary: add floormod support
Signed-off-by: Mingyu Yin <mingyu.yin@intel.com>
Diffstat (limited to 'tests/dnn')
-rw-r--r--tests/dnn/dnn-layer-mathbinary-test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/dnn/dnn-layer-mathbinary-test.c b/tests/dnn/dnn-layer-mathbinary-test.c
index e7f8f8557c..5422b2a207 100644
--- a/tests/dnn/dnn-layer-mathbinary-test.c
+++ b/tests/dnn/dnn-layer-mathbinary-test.c
@@ -40,6 +40,8 @@ static float get_expected(float f1, float f2, DNNMathBinaryOperation op)
return f1 / f2;
case DMBO_MINIMUM:
return (f1 < f2) ? f1 : f2;
+ case DMBO_FLOORMOD:
+ return (float)((int)(f1) % (int)(f2));
default:
av_assert0(!"not supported yet");
return 0.f;
@@ -205,5 +207,8 @@ int main(int argc, char **argv)
if (test(DMBO_MINIMUM))
return 1;
+ if (test(DMBO_FLOORMOD))
+ return 1;
+
return 0;
}