|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Phase 13 update-scheme aware engine. More...
#include <cstddef>#include <functional>#include <type_traits>#include <utility>#include <ah-errors.H>#include <ca-traits.H>#include <tpl_ca_concepts.H>#include <tpl_ca_neighborhood.H>#include <tpl_ca_update_scheme.H>Go to the source code of this file.
Classes | |
| class | Aleph::CA::Null_Neighborhood< Rank > |
| Placeholder neighbourhood for engines that drive block rules. More... | |
| class | Aleph::CA::Async_Engine< Lattice, Rule, Neighborhood, Update_Scheme > |
| Update-scheme aware engine. More... | |
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
| namespace | Aleph::CA |
| namespace | Aleph::CA::ca_async_engine_detail |
Concepts | |
| concept | Aleph::CA::ca_async_engine_detail::HasApplyWithOrigin |
Detect whether the scheme exposes apply_with_origin(engine, rule, origin) (Margolus). | |
Phase 13 update-scheme aware engine.
Async_Engine<Lattice, Rule, Neighborhood, Update_Scheme> is the Phase 13 generic engine: it owns one (or, when the scheme requires it, two) lattice buffers and dispatches each step() to the chosen update scheme strategy. The scheme controls the visit order, the in-place vs double-buffer write strategy, and (for Margolus) the block-rule semantics.
The engine itself is intentionally minimal: it owns state, exposes the buffers and the neighborhood, and forwards step() to the scheme. All variation lives in the strategies of tpl_ca_update_scheme.H. This is the "ortogonal" design called for in Phase 13: combine any Lattice × Rule × Update_Scheme without spawning a new engine per scheme.
Design constraints:
Update_Scheme::requires_double_buffer == false (Sequential, Random_Asynchronous, Margolus) only the current lattice is allocated; the next-buffer member stays empty, saving roughly 50% of the storage compared to Synchronous_Engine.on_pre_step / on_post_step mirror the synchronous engine API.step_back() reverses the most recent step. For an involution Block_Rule the composition forward(N) ∘ backward(N) is the bit-exact identity.Block-rule schemes (those with requires_block_rule == true) ignore the Neighborhood template parameter; pass Null_Neighborhood<Rank> in that case.
Definition in file tpl_ca_async_engine.H.