[{"id":29887,"web_url":"https://patchwork.libcamera.org/comment/29887/","msgid":"<ZmqiCPWturPVsCot@pyrite.rasen.tech>","date":"2024-06-13T07:38:48","subject":"Re: [PATCH 06/11] ipa: libipa: pwl: Make the empty() function inline","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"On Thu, Jun 13, 2024 at 04:39:39AM +0300, Laurent Pinchart wrote:\n> The Pwl::empty() function is a one-liner that can be easily optimized by\n> the compiler given the chance. Make it inline.\n> \n> While at it, move the function documentation block to match the class\n> declaration order.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/ipa/libipa/pwl.cpp | 15 ++++++---------\n>  src/ipa/libipa/pwl.h   |  2 +-\n>  2 files changed, 7 insertions(+), 10 deletions(-)\n> \n> diff --git a/src/ipa/libipa/pwl.cpp b/src/ipa/libipa/pwl.cpp\n> index 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\n> diff --git a/src/ipa/libipa/pwl.h b/src/ipa/libipa/pwl.h\n> index 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>","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 51EE6C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 13 Jun 2024 07:38:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EA8C46548B;\n\tThu, 13 Jun 2024 09:38:57 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7346165458\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Jun 2024 09:38:55 +0200 (CEST)","from pyrite.rasen.tech (h175-177-049-156.catv02.itscom.jp\n\t[175.177.49.156])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 515244CF;\n\tThu, 13 Jun 2024 09:38:40 +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=\"Iq5g4R0k\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718264321;\n\tbh=oqk4QYfRqhkcTY4xIpuBuJJzn0FnIaAftx3dhH928zM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Iq5g4R0k7wKOFbHCqINSvjtT3edEmB2roRDRvUCd6o5260nyTwJ4dHc3pPd6fkMBJ\n\tmTu6BtZrOfgpoWFmfges/UK1akWbp5ujM/TYGQmYUH8hmIW+PeQ6vxVEOHuA/UXUcl\n\tQm09GK0KxE8yXQv2VQc56bHWqlOThfThEy1D0YE8=","Date":"Thu, 13 Jun 2024 16:38:48 +0900","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tNaushir Patuck <naush@raspberrypi.com>","Subject":"Re: [PATCH 06/11] ipa: libipa: pwl: Make the empty() function inline","Message-ID":"<ZmqiCPWturPVsCot@pyrite.rasen.tech>","References":"<20240613013944.23344-1-laurent.pinchart@ideasonboard.com>\n\t<20240613013944.23344-7-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20240613013944.23344-7-laurent.pinchart@ideasonboard.com>","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>"}},{"id":29912,"web_url":"https://patchwork.libcamera.org/comment/29912/","msgid":"<171827732188.1550852.1277118406680424651@ping.linuxembedded.co.uk>","date":"2024-06-13T11:15:21","subject":"Re: [PATCH 06/11] ipa: libipa: pwl: Make the empty() function inline","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2024-06-13 02:39:39)\n> The Pwl::empty() function is a one-liner that can be easily optimized by\n> the compiler given the chance. Make it inline.\n> \n> While at it, move the function documentation block to match the class\n> declaration order.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  src/ipa/libipa/pwl.cpp | 15 ++++++---------\n>  src/ipa/libipa/pwl.h   |  2 +-\n>  2 files changed, 7 insertions(+), 10 deletions(-)\n> \n> diff --git a/src/ipa/libipa/pwl.cpp b/src/ipa/libipa/pwl.cpp\n> index 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>                 points_.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>         return 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> -       return points_.empty();\n> -}\n> -\n>  /**\n>   * \\brief Evaluate the piecewise linear function\n>   * \\param[in] x The x value to input into the function\n> diff --git a/src/ipa/libipa/pwl.h b/src/ipa/libipa/pwl.h\n> index 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>         void append(double x, double y, double eps = 1e-6);\n>  \n> -       bool empty() const;\n> +       bool empty() const { return points_.empty(); }\n>         Interval domain() const;\n>         Interval range() const;\n>  \n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","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 080E6C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 13 Jun 2024 11:15:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0FBD865490;\n\tThu, 13 Jun 2024 13:15:26 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 15B2365462\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Jun 2024 13:15:25 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D54344CF;\n\tThu, 13 Jun 2024 13:15:10 +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=\"YgHsehlw\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718277310;\n\tbh=SMFVdc5l6zH9eSO1vc0Wr2yMmSjTklvr+kfxAyU5keU=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=YgHsehlwQk9Gmoj2SvzR8ADRVUMsq7d5LjoSAP+hrYh5HnoYd+dltMDA2cZU4jp+E\n\ti+urwRLt/amXLk7uoBrv5dsJJGx83Oz9XCmrSrIgGleq1mW0aZoy7O9TGo8BmEbTUq\n\t+nf5/xxVikXGehrj8L+3Er6dVqfF9zqmwOtPjZVg=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240613013944.23344-7-laurent.pinchart@ideasonboard.com>","References":"<20240613013944.23344-1-laurent.pinchart@ideasonboard.com>\n\t<20240613013944.23344-7-laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH 06/11] ipa: libipa: pwl: Make the empty() function inline","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Paul Elder <paul.elder@ideasonboard.com>,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tNaushir Patuck <naush@raspberrypi.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 13 Jun 2024 12:15:21 +0100","Message-ID":"<171827732188.1550852.1277118406680424651@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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>"}}]