X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=tests%2Fcheckasm%2Ffloat_dsp.c;h=2abe4eccbdea2756fc335d2e3e346c837ed04a2c;hb=c4c2c4df76e15cf3e4c7a0b7500d3c0f8dade271;hp=2f999a3162571d3cacc5ccb007d3637c018a07d0;hpb=8822e2b9543bb02fb2889dff627b6db023053253;p=ffmpeg diff --git a/tests/checkasm/float_dsp.c b/tests/checkasm/float_dsp.c index 2f999a31625..2abe4eccbde 100644 --- a/tests/checkasm/float_dsp.c +++ b/tests/checkasm/float_dsp.c @@ -61,6 +61,28 @@ static void test_vector_fmul(const float *src0, const float *src1) bench_new(odst, src0, src1, LEN); } +static void test_vector_dmul(const double *src0, const double *src1) +{ + LOCAL_ALIGNED_32(double, cdst, [LEN]); + LOCAL_ALIGNED_32(double, odst, [LEN]); + int i; + + declare_func(void, double *dst, const double *src0, const double *src1, + int len); + + call_ref(cdst, src0, src1, LEN); + call_new(odst, src0, src1, LEN); + for (i = 0; i < LEN; i++) { + if (!double_near_abs_eps(cdst[i], odst[i], DBL_EPSILON)) { + fprintf(stderr, "%d: %- .12f - %- .12f = % .12g\n", + i, cdst[i], odst[i], cdst[i] - odst[i]); + fail(); + break; + } + } + bench_new(odst, src0, src1, LEN); +} + #define ARBITRARY_FMUL_ADD_CONST 0.005 static void test_vector_fmul_add(const float *src0, const float *src1, const float *src2) { @@ -294,6 +316,8 @@ void checkasm_check_float_dsp(void) if (check_func(fdsp->vector_fmac_scalar, "vector_fmac_scalar")) test_vector_fmac_scalar(src0, src1, src2); report("vector_fmac"); + if (check_func(fdsp->vector_dmul, "vector_dmul")) + test_vector_dmul(dbl_src0, dbl_src1); if (check_func(fdsp->vector_dmul_scalar, "vector_dmul_scalar")) test_vector_dmul_scalar(dbl_src0, dbl_src1); report("vector_dmul");