From 10b4425e842d10b7fbfa85978969ed4591d6b98e Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Wed, 7 Feb 2024 10:56:52 -0500 Subject: Fully implemented Query concept and adjusted queries to use it --- include/framework/DynamicExtension.h | 2 +- include/framework/interface/Query.h | 25 ++++++++++-------------- include/framework/scheduling/Epoch.h | 2 +- include/framework/scheduling/Task.h | 4 ++-- include/framework/structure/ExtensionStructure.h | 2 +- include/framework/structure/InternalLevel.h | 4 ++-- 6 files changed, 17 insertions(+), 22 deletions(-) (limited to 'include/framework') diff --git a/include/framework/DynamicExtension.h b/include/framework/DynamicExtension.h index 3e9d0fb..5c021f2 100644 --- a/include/framework/DynamicExtension.h +++ b/include/framework/DynamicExtension.h @@ -31,7 +31,7 @@ namespace de { -template Q, LayoutPolicy L=LayoutPolicy::TEIRING, DeletePolicy D=DeletePolicy::TAGGING, SchedulerInterface SCHED=SerialScheduler> class DynamicExtension { typedef S Shard; diff --git a/include/framework/interface/Query.h b/include/framework/interface/Query.h index ca742c3..8cf9660 100644 --- a/include/framework/interface/Query.h +++ b/include/framework/interface/Query.h @@ -8,31 +8,26 @@ */ #pragma once -#include +#include "framework/QueryRequirements.h" #include -#include "util/types.h" - +namespace de{ // FIXME: The interface is not completely specified yet, as it is pending // determining a good way to handle additional template arguments // to get the Shard and Record types into play -template -concept QueryInterface = requires(Q q, void *p, std::vector &s) { - - /* - {Q::get_query_state(p, p)} -> std::convertible_to; - {Q::get_buffer_query_state(p, p)} -> std::convertible_to; - */ +template +concept QueryInterface = requires(void *p, S *sh, std::vector &s, std::vector>> &rv, BufferView *bv) { + {Q::get_query_state(sh, p)} -> std::convertible_to; + {Q::get_buffer_query_state(bv, p)} -> std::convertible_to; {Q::process_query_states(p, s, p)}; - /* - {Q::query(s, p, p)} -> std::convertible_to>>; + {Q::query(sh, p, p)} -> std::convertible_to>>; {Q::buffer_query(p, p)} -> std::convertible_to>>; {Q::merge(rv, p)} -> std::convertible_to>; - */ - {Q::delete_query_state(std::declval())} -> std::same_as; - {Q::delete_buffer_query_state(std::declval())} -> std::same_as; + {Q::delete_query_state(p)} -> std::same_as; + {Q::delete_buffer_query_state(p)} -> std::same_as; {Q::EARLY_ABORT} -> std::convertible_to; {Q::SKIP_DELETE_FILTER} -> std::convertible_to; }; +} diff --git a/include/framework/scheduling/Epoch.h b/include/framework/scheduling/Epoch.h index 7b533b6..48b7742 100644 --- a/include/framework/scheduling/Epoch.h +++ b/include/framework/scheduling/Epoch.h @@ -18,7 +18,7 @@ namespace de { -template +template Q, LayoutPolicy L> class Epoch { private: typedef MutableBuffer Buffer; diff --git a/include/framework/scheduling/Task.h b/include/framework/scheduling/Task.h index 6f6b913..ba0001d 100644 --- a/include/framework/scheduling/Task.h +++ b/include/framework/scheduling/Task.h @@ -18,7 +18,7 @@ namespace de { -template +template Q, LayoutPolicy L> struct ReconstructionArgs { Epoch *epoch; std::vector merges; @@ -27,7 +27,7 @@ struct ReconstructionArgs { void *extension; }; -template +template Q, LayoutPolicy L> struct QueryArgs { std::promise> result_set; void *query_parms; diff --git a/include/framework/structure/ExtensionStructure.h b/include/framework/structure/ExtensionStructure.h index ae566cb..0b8263e 100644 --- a/include/framework/structure/ExtensionStructure.h +++ b/include/framework/structure/ExtensionStructure.h @@ -22,7 +22,7 @@ namespace de { -template +template Q, LayoutPolicy L=LayoutPolicy::TEIRING> class ExtensionStructure { typedef S Shard; typedef BufferView BuffView; diff --git a/include/framework/structure/InternalLevel.h b/include/framework/structure/InternalLevel.h index e9874e0..0fd5275 100644 --- a/include/framework/structure/InternalLevel.h +++ b/include/framework/structure/InternalLevel.h @@ -19,12 +19,12 @@ #include "framework/structure/BufferView.h" namespace de { -template +template Q> class InternalLevel; -template +template Q> class InternalLevel { typedef S Shard; typedef BufferView BuffView; -- cgit v1.2.3