From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id D64DE4A2ED for ; Wed, 29 May 2024 15:00:26 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 336B868D390; Wed, 29 May 2024 18:00:06 +0300 (EEST) Received: from ursule.remlab.net (vps-a2bccee9.vps.ovh.net [51.75.19.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F025A68D22E for ; Wed, 29 May 2024 17:59:56 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id 87FD0C0214 for ; Wed, 29 May 2024 17:59:56 +0300 (EEST) From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Wed, 29 May 2024 17:59:54 +0300 Message-ID: <20240529145955.32189-3-remi@remlab.net> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240529145955.32189-1-remi@remlab.net> References: <20240529145955.32189-1-remi@remlab.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/4] checkasm/float_dsp: add double-precision scalar product X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --- tests/checkasm/float_dsp.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/checkasm/float_dsp.c b/tests/checkasm/float_dsp.c index cadfa65e2a..296db1cff9 100644 --- a/tests/checkasm/float_dsp.c +++ b/tests/checkasm/float_dsp.c @@ -278,6 +278,22 @@ static void test_scalarproduct_float(const float *src0, const float *src1) bench_new(src0, src1, LEN); } +static void test_scalarproduct_double(const double *src0, const double *src1) +{ + double cprod, oprod; + + declare_func_float(double, const double *, const double *, size_t); + + cprod = call_ref(src0, src1, LEN); + oprod = call_new(src0, src1, LEN); + if (!double_near_abs_eps(cprod, oprod, ARBITRARY_SCALARPRODUCT_CONST)) { + fprintf(stderr, "%- .12f - %- .12f = % .12g\n", + cprod, oprod, cprod - oprod); + fail(); + } + bench_new(src0, src1, LEN); +} + void checkasm_check_float_dsp(void) { LOCAL_ALIGNED_32(float, src0, [LEN]); @@ -334,6 +350,9 @@ void checkasm_check_float_dsp(void) if (check_func(fdsp->scalarproduct_float, "scalarproduct_float")) test_scalarproduct_float(src3, src4); report("scalarproduct_float"); + if (check_func(fdsp->scalarproduct_double, "scalarproduct_double")) + test_scalarproduct_double(dbl_src0, dbl_src1); + report("scalarproduct_double"); av_freep(&fdsp); } -- 2.45.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".