5 #ifndef TELAMON_NORMALIZED_REPRESENTATION_HH
6 #define TELAMON_NORMALIZED_REPRESENTATION_HH
20 #include <extern/expected_lite/expected.hpp>
29 template<
typename Commit>
30 concept
Commits = requires (Commit desc) {
31 requires std::ranges::input_range<Commit>;
32 requires CasWithVersioning<std::ranges::range_value_t<Commit>>;
40 template<
typename LockFree>
43 const typename LockFree::Input &inp,
44 const typename LockFree::Commit &desc,
45 const nonstd::expected<std::monostate, std::optional<int>> &executed
47 typename LockFree::Input;
48 typename LockFree::Output;
49 typename LockFree::Commit;
51 requires Commits<typename LockFree::Commit>;
52 requires std::is_copy_constructible_v<typename LockFree::Commit>;
54 { lf.generator(inp, contention) } -> std::same_as<std::optional<typename LockFree::Commit>>;
55 { lf.wrap_up(executed, desc, contention) } -> std::same_as<nonstd::expected<std::optional<typename LockFree::Output>, std::monostate>>;
56 { lf.fast_path(inp, contention) } -> std::same_as<std::optional<typename LockFree::Output>>;
Definitions of ContentionFailureCounter, CasStatus, CasDescriptor, CasWithVersioning,...
Measures the contention which was encountered during simulation.
Definition: Versioning.hh:13
This module encapsulates the implementation of the simulator.
Definition: NormalizedRepresentation.hh:25
concept Commits
Requires commit to be iterable and its items to satisfy CasWithVersioning.
Definition: NormalizedRepresentation.hh:30
concept NormalizedRepresentation
Here are the operations which are required to be described in the lock-free algorithm in order to use...
Definition: NormalizedRepresentation.hh:41