From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from va-2-37.ptr.blmpb.com (va-2-37.ptr.blmpb.com [209.127.231.37]) by sourceware.org (Postfix) with ESMTPS id 8762B3858D3C for ; Mon, 22 Jan 2024 02:16:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8762B3858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=oss.cipunited.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=oss.cipunited.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8762B3858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.127.231.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705889811; cv=none; b=a++XCW/Ve1XIKXdnl7T9V+3nHRcQ0XvnoziRZr7cvmqh3UjeVuiw5DhSm3uYVq01ZRk8dTuXFPFsVUQR+H7+S3enWY97tfFCNlCAJh6H83i4S0sG9uhkKGzR30KTSGeNFk//8WfoxaA7bq6Hiv+JsLhpewgxjX+QYk+kmx3X00Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705889811; c=relaxed/simple; bh=TTIVztgxBeMRbvBozKGZJbi+/iho47fZJGZw3jvcAtI=; h=DKIM-Signature:To:From:Subject:Date:Message-Id:Mime-Version; b=LZF18yh0qFHE+Mf9BOj+J3UqGtQzBg7yGkuX4KM1vIvwZaYwj6/q9a/UFeebIlJLzvUNQce735f75iteMhX6SA29jPI5b40C8r+eLows44oTQga7RYOLGZOGpvrM7Gi/tNYYtouVIhKGD1/m+zFa44hlCkcNvKTO5W9sdIWYE+8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=feishu2303200042; d=oss.cipunited.com; t=1705889797; h=from:subject:mime-version:from:date:message-id:subject:to:cc: reply-to:content-type:mime-version:in-reply-to:message-id; bh=j+4J66LZiKiXMYXYNy37c+/GncusjNLZALTnrj79mUM=; b=Vmdq1J42Beqck3Q8eTXQznkHdXRMdkRzOby2lkevAfl3xbTiBeYbBRTSh4Sh3sqKUPsy25 Fhch4z96lEuB8GtWL+/ZOj2QmBov+KIKqoMTr6j8D9gPCEl+gujolwyY6Koen8GgIHYHQT Jf8fHRi4bA9m/2SiAcZkEkAl/0dNMcVPdyIkF+Xz0txz9z78+TQQTIDz6JX9nfwFejWJBu oCOr+aHUzBqIrE6e9J3Rn4Ng9XKGdEIRoeCc4KD8F8jvSjhRctpvl/+o4coOuxEG9Rp6IX IIWVwpziov8rgYKH01Pjblm9YE1d+f/iABnmbBo6At6195s8XQqVrkR1wsjWEw== To: From: "Junxian Zhu" Subject: [PATCH v2] benchtests: Add more benchtests for rounding functions. Cc: "Junxian Zhu" X-Original-From: zhujunxian@oss.cipunited.com Content-Transfer-Encoding: 7bit X-Lms-Return-Path: Content-Type: text/plain; charset=UTF-8 Date: Mon, 22 Jan 2024 10:16:19 +0800 Message-Id: <20240122021619.941-1-zhujunxian@oss.cipunited.com> Mime-Version: 1.0 Received: from localhost.localdomain ([1.192.71.160]) by smtp.feishu.cn with ESMTPS; Mon, 22 Jan 2024 10:16:35 +0800 X-Mailer: git-send-email 2.43.0.windows.1 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: From: Junxian Zhu This patch adds more benchtests for rounding functions. The double inputs are copied from trunc-inputs, the float inputs are copied from truncf-inputs. and the rintf is copied from rint-inputs. --- benchtests/Makefile | 11 +++++++++++ benchtests/ceil-inputs | 22 ++++++++++++++++++++++ benchtests/ceilf-inputs | 21 +++++++++++++++++++++ benchtests/floor-inputs | 22 ++++++++++++++++++++++ benchtests/floorf-inputs | 21 +++++++++++++++++++++ benchtests/llrint-inputs | 22 ++++++++++++++++++++++ benchtests/llrintf-inputs | 21 +++++++++++++++++++++ benchtests/lrint-inputs | 22 ++++++++++++++++++++++ benchtests/lrintf-inputs | 21 +++++++++++++++++++++ benchtests/nearbyint-inputs | 22 ++++++++++++++++++++++ benchtests/nearbyintf-inputs | 21 +++++++++++++++++++++ benchtests/rintf-inputs | 7 +++++++ 12 files changed, 233 insertions(+) create mode 100644 benchtests/ceil-inputs create mode 100644 benchtests/ceilf-inputs create mode 100644 benchtests/floor-inputs create mode 100644 benchtests/floorf-inputs create mode 100644 benchtests/llrint-inputs create mode 100644 benchtests/llrintf-inputs create mode 100644 benchtests/lrint-inputs create mode 100644 benchtests/lrintf-inputs create mode 100644 benchtests/nearbyint-inputs create mode 100644 benchtests/nearbyintf-inputs create mode 100644 benchtests/rintf-inputs diff --git a/benchtests/Makefile b/benchtests/Makefile index 4fb9bae023..05b8751c55 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -32,6 +32,8 @@ bench-math := \ atan2 \ atanh \ cbrt \ + ceil \ + ceilf \ cos \ cosf \ cosh \ @@ -44,6 +46,8 @@ bench-math := \ exp2f \ expf \ expm1 \ + floor \ + floorf \ fmax \ fmaxf \ fmin \ @@ -60,6 +64,8 @@ bench-math := \ j0 \ j1 \ lgamma \ + llrint \ + llrintf \ log \ log10 \ log1p \ @@ -68,10 +74,15 @@ bench-math := \ logb \ logbf \ logf \ + lrint \ + lrintf \ modf \ + nearbyint \ + nearbyintf \ pow \ powf \ rint \ + rintf \ roundeven \ roundevenf \ sin \ diff --git a/benchtests/ceil-inputs b/benchtests/ceil-inputs new file mode 100644 index 0000000000..49ff407a6a --- /dev/null +++ b/benchtests/ceil-inputs @@ -0,0 +1,22 @@ +## args: double +## ret: double +## includes: math.h +0.0 +-0.0 +0.001 +-0.001 +0.5 +-0.5 +0.999 +-0.999 +1.0 +-1.0 +1.001 +-1.001 +123.5 +-123.5 +12345.1 +-1000000.1 +1e15 +-1e30 +1e200 diff --git a/benchtests/ceilf-inputs b/benchtests/ceilf-inputs new file mode 100644 index 0000000000..c37c5dacba --- /dev/null +++ b/benchtests/ceilf-inputs @@ -0,0 +1,21 @@ +## args: float +## ret: float +## includes: math.h +0.0f +-0.0f +0.001f +-0.001f +0.5f +-0.5f +0.999f +-0.999f +1.0f +-1.0f +1.001f +-1.001f +123.5f +-123.5f +12345.1f +-1000000.5f +1e15f +-1e30f diff --git a/benchtests/floor-inputs b/benchtests/floor-inputs new file mode 100644 index 0000000000..49ff407a6a --- /dev/null +++ b/benchtests/floor-inputs @@ -0,0 +1,22 @@ +## args: double +## ret: double +## includes: math.h +0.0 +-0.0 +0.001 +-0.001 +0.5 +-0.5 +0.999 +-0.999 +1.0 +-1.0 +1.001 +-1.001 +123.5 +-123.5 +12345.1 +-1000000.1 +1e15 +-1e30 +1e200 diff --git a/benchtests/floorf-inputs b/benchtests/floorf-inputs new file mode 100644 index 0000000000..c37c5dacba --- /dev/null +++ b/benchtests/floorf-inputs @@ -0,0 +1,21 @@ +## args: float +## ret: float +## includes: math.h +0.0f +-0.0f +0.001f +-0.001f +0.5f +-0.5f +0.999f +-0.999f +1.0f +-1.0f +1.001f +-1.001f +123.5f +-123.5f +12345.1f +-1000000.5f +1e15f +-1e30f diff --git a/benchtests/llrint-inputs b/benchtests/llrint-inputs new file mode 100644 index 0000000000..49ff407a6a --- /dev/null +++ b/benchtests/llrint-inputs @@ -0,0 +1,22 @@ +## args: double +## ret: double +## includes: math.h +0.0 +-0.0 +0.001 +-0.001 +0.5 +-0.5 +0.999 +-0.999 +1.0 +-1.0 +1.001 +-1.001 +123.5 +-123.5 +12345.1 +-1000000.1 +1e15 +-1e30 +1e200 diff --git a/benchtests/llrintf-inputs b/benchtests/llrintf-inputs new file mode 100644 index 0000000000..c37c5dacba --- /dev/null +++ b/benchtests/llrintf-inputs @@ -0,0 +1,21 @@ +## args: float +## ret: float +## includes: math.h +0.0f +-0.0f +0.001f +-0.001f +0.5f +-0.5f +0.999f +-0.999f +1.0f +-1.0f +1.001f +-1.001f +123.5f +-123.5f +12345.1f +-1000000.5f +1e15f +-1e30f diff --git a/benchtests/lrint-inputs b/benchtests/lrint-inputs new file mode 100644 index 0000000000..49ff407a6a --- /dev/null +++ b/benchtests/lrint-inputs @@ -0,0 +1,22 @@ +## args: double +## ret: double +## includes: math.h +0.0 +-0.0 +0.001 +-0.001 +0.5 +-0.5 +0.999 +-0.999 +1.0 +-1.0 +1.001 +-1.001 +123.5 +-123.5 +12345.1 +-1000000.1 +1e15 +-1e30 +1e200 diff --git a/benchtests/lrintf-inputs b/benchtests/lrintf-inputs new file mode 100644 index 0000000000..c37c5dacba --- /dev/null +++ b/benchtests/lrintf-inputs @@ -0,0 +1,21 @@ +## args: float +## ret: float +## includes: math.h +0.0f +-0.0f +0.001f +-0.001f +0.5f +-0.5f +0.999f +-0.999f +1.0f +-1.0f +1.001f +-1.001f +123.5f +-123.5f +12345.1f +-1000000.5f +1e15f +-1e30f diff --git a/benchtests/nearbyint-inputs b/benchtests/nearbyint-inputs new file mode 100644 index 0000000000..49ff407a6a --- /dev/null +++ b/benchtests/nearbyint-inputs @@ -0,0 +1,22 @@ +## args: double +## ret: double +## includes: math.h +0.0 +-0.0 +0.001 +-0.001 +0.5 +-0.5 +0.999 +-0.999 +1.0 +-1.0 +1.001 +-1.001 +123.5 +-123.5 +12345.1 +-1000000.1 +1e15 +-1e30 +1e200 diff --git a/benchtests/nearbyintf-inputs b/benchtests/nearbyintf-inputs new file mode 100644 index 0000000000..c37c5dacba --- /dev/null +++ b/benchtests/nearbyintf-inputs @@ -0,0 +1,21 @@ +## args: float +## ret: float +## includes: math.h +0.0f +-0.0f +0.001f +-0.001f +0.5f +-0.5f +0.999f +-0.999f +1.0f +-1.0f +1.001f +-1.001f +123.5f +-123.5f +12345.1f +-1000000.5f +1e15f +-1e30f diff --git a/benchtests/rintf-inputs b/benchtests/rintf-inputs new file mode 100644 index 0000000000..f7c6f06789 --- /dev/null +++ b/benchtests/rintf-inputs @@ -0,0 +1,7 @@ +## args: float +## ret: float +## includes: math.h +78.5 +-78.5 +4503599627370497.0 +-4503599627370497.0 -- 2.43.0.windows.1