From 6146b9f304863f822c49a09b95a0a8e122c545b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20K=2E=20Guti=C3=A9rrez?= Date: Fri, 26 Jul 2024 11:40:03 -0600 Subject: [PATCH] Define the equality operator for qvi_hwloc_bitmap_s. (#252) Signed-off-by: Samuel K. Gutierrez --- src/qvi-hwloc.h | 7 +++++++ src/qvi-hwpool.cc | 11 ----------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/qvi-hwloc.h b/src/qvi-hwloc.h index fc5f1b2..fa2d24a 100644 --- a/src/qvi-hwloc.h +++ b/src/qvi-hwloc.h @@ -451,6 +451,13 @@ struct qvi_hwloc_bitmap_s { { qvi_hwloc_bitmap_delete(&m_data); } + /** Equality operator. */ + bool + operator==( + const qvi_hwloc_bitmap_s &x + ) const { + return hwloc_bitmap_compare(cdata(), x.cdata()) == 0; + } /** Assignment operator. */ void operator=(const qvi_hwloc_bitmap_s &src) diff --git a/src/qvi-hwpool.cc b/src/qvi-hwpool.cc index ba3af2f..e33ba93 100644 --- a/src/qvi-hwpool.cc +++ b/src/qvi-hwpool.cc @@ -47,17 +47,6 @@ #include "qvi-utils.h" #if 0 -/** - * Returns whether two cpusets are equal. - */ -static bool -cpusets_equal( - hwloc_const_cpuset_t a, - hwloc_const_cpuset_t b -) { - return hwloc_bitmap_compare(a, b) == 0; -} - /** * */