|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Classical double-buffer synchronous update. More...
#include <tpl_ca_update_scheme.H>
Public Member Functions | |
| template<typename Engine , typename Rule > | |
| void | apply (Engine &e, Rule &r) const |
| Execute one synchronous step. | |
Static Public Attributes | |
| static constexpr bool | requires_double_buffer = true |
| Engines must allocate a second buffer for this scheme. | |
| static constexpr bool | requires_block_rule = false |
| Operates on cell rules — not on block rules. | |
Classical double-buffer synchronous update.
Reads the current frame, computes every cell's next state, writes into the next-buffer, then swaps the two buffers in O(1). Equivalent to the Phase 3 Synchronous_Engine; provided as a strategy so the Phase 13 engine can pick it up like any other scheme.
| Order | iteration tag (RowMajor, ColumnMajor, Tile<W, H>). |
Definition at line 250 of file tpl_ca_update_scheme.H.
|
inline |
Execute one synchronous step.
| Engine | engine type providing current_buffer(), next_buffer(), swap_buffers(), neighborhood() and step_count(). |
| Rule | cell rule satisfying RuleLike<Rule, Lattice>. |
| [in,out] | e | engine reference. |
| [in] | r | rule reference. |
| Any | exception propagated by the rule or the lattice. |
Definition at line 268 of file tpl_ca_update_scheme.H.
References Aleph::CA::apply_rule(), Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::gather_neighbors(), and r.
|
staticconstexpr |
Operates on cell rules — not on block rules.
Definition at line 255 of file tpl_ca_update_scheme.H.
|
staticconstexpr |
Engines must allocate a second buffer for this scheme.
Definition at line 253 of file tpl_ca_update_scheme.H.