From 5d02164fbb62425789f8db05e44485a9563ae915 Mon Sep 17 00:00:00 2001 From: Joseph Schuchart Date: Tue, 4 Jun 2024 17:36:01 -0400 Subject: [PATCH] Replace std::span with ttg::span Signed-off-by: Joseph Schuchart --- ttg/ttg.h | 1 + ttg/ttg/constraint.h | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ttg/ttg.h b/ttg/ttg.h index 50a891c1d..8dd86a636 100644 --- a/ttg/ttg.h +++ b/ttg/ttg.h @@ -26,6 +26,7 @@ #include "ttg/util/print.h" #include "ttg/world.h" +#include "ttg/constraint.h" #include "ttg/edge.h" #include "ttg/ptr.h" diff --git a/ttg/ttg/constraint.h b/ttg/ttg/constraint.h index 311bf3ead..54f070f73 100644 --- a/ttg/ttg/constraint.h +++ b/ttg/ttg/constraint.h @@ -7,6 +7,8 @@ #include #include +#include "ttg/util/span.h" + #ifdef TTG_USE_BUNDLED_BOOST_CALLABLE_TRAITS #include #else @@ -18,7 +20,7 @@ namespace ttg { template struct ConstraintBase { using key_type = Key; - using listener_t = std::function&)>; + using listener_t = std::function&)>; ConstraintBase() { } @@ -45,7 +47,7 @@ namespace ttg { m_listeners.insert_or_assign(tt, std::move(l)); } - void notify_listener(const std::span& keys, ttg::TTBase* tt) { + void notify_listener(const ttg::span& keys, ttg::TTBase* tt) { auto& release = m_listeners[tt]; release(keys); } @@ -162,7 +164,7 @@ namespace ttg { for (auto& seq : elem.m_keys) { // account for the newly active keys this->m_active.fetch_add(seq.second.size(), std::memory_order_relaxed); - this->notify_listener(std::span(seq.second.data(), seq.second.size()), seq.first); + this->notify_listener(ttg::span(seq.second.data(), seq.second.size()), seq.first); } } @@ -195,7 +197,7 @@ namespace ttg { for (auto& elem : seqs) { for (auto& e : elem.m_keys) { // account for the newly active keys - this->notify_listener(std::span(e.second.data(), e.second.size()), e.first); + this->notify_listener(ttg::span(e.second.data(), e.second.size()), e.first); } } }