Patch Detail
Show a patch.
GET /api/patches/20278/?format=api
{ "id": 20278, "url": "https://patchwork.libcamera.org/api/patches/20278/?format=api", "web_url": "https://patchwork.libcamera.org/patch/20278/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20240613013944.23344-7-laurent.pinchart@ideasonboard.com>", "date": "2024-06-13T01:39:39", "name": "[06/11] ipa: libipa: pwl: Make the empty() function inline", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "9b361e15641dc76bf7d39aaa55f58a9d89db6339", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/20278/mbox/", "series": [ { "id": 4386, "url": "https://patchwork.libcamera.org/api/series/4386/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4386", "date": "2024-06-13T01:39:33", "name": "ipa: libipa: Vector and Pwl improvements", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4386/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/20278/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/20278/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6B677C3293\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 13 Jun 2024 01:40:19 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7FBC7654A5;\n\tThu, 13 Jun 2024 03:40:18 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F115665497\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Jun 2024 03:40:12 +0200 (CEST)", "from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 24E03D77;\n\tThu, 13 Jun 2024 03:39:59 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"OSzwPOD+\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718242799;\n\tbh=QfP+IXVNd5SDkUNs2zUuuWEjVVHYBLjTTkKgFe1q5Ug=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=OSzwPOD+M2boEMMlzGeHXoogFJmvF1igeacimHjve1cqZ83m+121LSlEqFzb9I67Q\n\tM8U6dXH+R7CDUnW5ywuPC5uXpstQ5hsxHN+hn/4NIMOn2rUcTMRcB6cCRe91Yvdlf0\n\tdXxAn4/rZ5IkQ/wDgaKjXZOk8uMcIwUbKTUC+998=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Paul Elder <paul.elder@ideasonboard.com>,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tNaushir Patuck <naush@raspberrypi.com>", "Subject": "[PATCH 06/11] ipa: libipa: pwl: Make the empty() function inline", "Date": "Thu, 13 Jun 2024 04:39:39 +0300", "Message-ID": "<20240613013944.23344-7-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.44.2", "In-Reply-To": "<20240613013944.23344-1-laurent.pinchart@ideasonboard.com>", "References": "<20240613013944.23344-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The Pwl::empty() function is a one-liner that can be easily optimized by\nthe compiler given the chance. Make it inline.\n\nWhile at it, move the function documentation block to match the class\ndeclaration order.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/libipa/pwl.cpp | 15 ++++++---------\n src/ipa/libipa/pwl.h | 2 +-\n 2 files changed, 7 insertions(+), 10 deletions(-)", "diff": "diff --git a/src/ipa/libipa/pwl.cpp b/src/ipa/libipa/pwl.cpp\nindex 1ba0108515a1..d8ea92be0a86 100644\n--- a/src/ipa/libipa/pwl.cpp\n+++ b/src/ipa/libipa/pwl.cpp\n@@ -182,6 +182,12 @@ void Pwl::prepend(double x, double y, const double eps)\n \t\tpoints_.insert(points_.begin(), Point({ x, y }));\n }\n \n+/**\n+ * \\fn Pwl::empty() const\n+ * \\brief Check if the piecewise linear function is empty\n+ * \\return True if there are no points in the function, false otherwise\n+ */\n+\n /**\n * \\brief Get the domain of the piecewise linear function\n * \\return An interval representing the domain\n@@ -203,15 +209,6 @@ Pwl::Interval Pwl::range() const\n \treturn Interval(lo, hi);\n }\n \n-/**\n- * \\brief Check if the piecewise linear function is empty\n- * \\return True if there are no points in the function, false otherwise\n- */\n-bool Pwl::empty() const\n-{\n-\treturn points_.empty();\n-}\n-\n /**\n * \\brief Evaluate the piecewise linear function\n * \\param[in] x The x value to input into the function\ndiff --git a/src/ipa/libipa/pwl.h b/src/ipa/libipa/pwl.h\nindex 4cc257f97b19..b4de00cf88f0 100644\n--- a/src/ipa/libipa/pwl.h\n+++ b/src/ipa/libipa/pwl.h\n@@ -51,7 +51,7 @@ public:\n \n \tvoid append(double x, double y, double eps = 1e-6);\n \n-\tbool empty() const;\n+\tbool empty() const { return points_.empty(); }\n \tInterval domain() const;\n \tInterval range() const;\n \n", "prefixes": [ "06/11" ] }