From a92271176a19e06611099c0eccc4e6a6887f4915 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Mon, 17 May 2021 00:30:13 +0200 Subject: Extract public version of SweepLB --- src/propagation.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/propagation.h (limited to 'src/propagation.h') diff --git a/src/propagation.h b/src/propagation.h new file mode 100644 index 0000000..0bcb435 --- /dev/null +++ b/src/propagation.h @@ -0,0 +1,28 @@ +#pragma once + +#include "cuboid.h" +#include "concepts.h" + +namespace concepts { + +template +concept CuboidConstructible = std::constructible_from; + +template +concept PopulationAccess = Arithmetic + && requires(BUFFER& b) { + { b.get(unsigned{}, stage::pre_collision()) } -> std::same_as; + { b.get(unsigned{}, stage::post_collision()) } -> std::same_as; +}; + +template +concept Propagatable = requires(BUFFER& b) { + b.stream(); +}; + +template +concept PropagatablePopulationBuffer = CuboidConstructible + && PopulationAccess + && Propagatable; + +} -- cgit v1.2.3