Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::CA::Block_Synchronous_Update< BlockSize, Order > Struct Template Reference

Synchronous update over rotating sub-blocks. More...

#include <tpl_ca_update_scheme.H>

Public Member Functions

template<typename Engine , typename Rule >
void apply (Engine &e, Rule &r) const
 Execute one block-synchronous step.
 

Static Public Attributes

static constexpr bool requires_double_buffer = true
 
static constexpr bool requires_block_rule = false
 
static constexpr std::size_t block_size = BlockSize
 

Detailed Description

template<std::size_t BlockSize = 4, typename Order = RowMajor>
struct Aleph::CA::Block_Synchronous_Update< BlockSize, Order >

Synchronous update over rotating sub-blocks.

The lattice is split into non-overlapping blocks of side BlockSize. Each step() updates all cells inside the active block index using the canonical synchronous rule (read from cur, write to nxt, swap), then advances the active block index. Cells outside the active block carry over unchanged.

After (n_blocks) steps every cell has been updated exactly once.

Template Parameters
BlockSizeside of the square (or cubic) block in cells.
Orderintra-block iteration order.

Definition at line 459 of file tpl_ca_update_scheme.H.

Member Function Documentation

◆ apply()

template<std::size_t BlockSize = 4, typename Order = RowMajor>
template<typename Engine , typename Rule >
void Aleph::CA::Block_Synchronous_Update< BlockSize, Order >::apply ( Engine &  e,
Rule &  r 
) const
inline

Execute one block-synchronous step.

Template Parameters
Engineengine type providing current_buffer(), next_buffer(), swap_buffers(), neighborhood() and step_count().
Rulecell rule satisfying RuleLike<Rule, Lattice>.
Parameters
[in,out]eengine reference.
[in]rrule reference.
Exceptions
Anyexception propagated by the rule or the lattice.

Definition at line 479 of file tpl_ca_update_scheme.H.

References Aleph::CA::apply_rule(), Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::gather_neighbors(), j0(), k, r, and Aleph::CA::Lattice< Storage, Boundary >::rank.

Member Data Documentation

◆ block_size

template<std::size_t BlockSize = 4, typename Order = RowMajor>
constexpr std::size_t Aleph::CA::Block_Synchronous_Update< BlockSize, Order >::block_size = BlockSize
staticconstexpr

Definition at line 466 of file tpl_ca_update_scheme.H.

◆ requires_block_rule

template<std::size_t BlockSize = 4, typename Order = RowMajor>
constexpr bool Aleph::CA::Block_Synchronous_Update< BlockSize, Order >::requires_block_rule = false
staticconstexpr

Definition at line 464 of file tpl_ca_update_scheme.H.

◆ requires_double_buffer

template<std::size_t BlockSize = 4, typename Order = RowMajor>
constexpr bool Aleph::CA::Block_Synchronous_Update< BlockSize, Order >::requires_double_buffer = true
staticconstexpr

Definition at line 463 of file tpl_ca_update_scheme.H.


The documentation for this struct was generated from the following file: