67#include <system_error>
84 using Extents = std::array<ca_size_t, 2>;
87 Extents extents_of(
const size_t n)
127 Grid life_grid(
const size_t n)
129 Grid g(extents_of(n), 0);
138 template <
class Engine>
139 void use_engine(Engine & e)
141 const size_t steps = e.steps_run();
143 EXPECT_EQ(e.steps_run(),
steps + 1);
147 if (e.frame().at(c) != 0)
150 EXPECT_LE(alive, e.frame().size());
152 EXPECT_EQ(e.steps_run(),
steps + 3);
156 template <
class Engine>
157 std::tuple<size_t, size_t, size_t> engine_print(
const Engine & e)
162 if (e.frame().at(c) != 0)
165 return {e.frame().size(), alive, e.steps_run()};
170 template <
class Observer>
179 Extents tile_extents_of(
const size_t n)
182 while (side * side < n)
183 side += Tiles::tile_side;
188 template <
typename F>
189 void for_each_tiled_cell(
const Extents & e,
F && f)
191 constexpr ca_size_t side = Tiles::tile_side;
192 for (
ca_size_t r0 = 0; r0 < e[0]; r0 += side)
193 for (
ca_size_t c0 = 0; c0 < e[1]; c0 += side)
195 for (
ca_size_t c = c0; c < c0 + side; ++c)
211 static size_t next = 0;
212 return slots[
next++ % 32];
218 static size_t next = 0;
219 return slots[
next++ % 32];
224 long long process_id() noexcept
227 return static_cast<long long>(_getpid());
229 return static_cast<long long>(getpid());
242 for (
size_t i = 0; i < paths.
size(); ++i)
245 std::filesystem::remove_all(paths(i), ec);
252 std::filesystem::path temp_path(
const std::string & kind)
254 static Temp_Paths temps;
255 const std::string name =
"aleph_moved_from_" + kind +
"_" + std::to_string(process_id())
256 +
"_" + std::to_string(temps.paths.size());
257 const std::filesystem::path path = std::filesystem::temp_directory_path() / name;
258 temps.paths.append(path);
266 const std::string path = temp_path(
"csv").string();
267 std::ofstream
out(path);
268 out <<
"rows," << n <<
"\n";
269 for (
size_t i = 0; i < n; ++i)
270 out << i <<
",b" << i <<
",c" << i <<
"\n";
277 Fixed_Rule() =
default;
278 Fixed_Rule(
const Fixed_Rule &) =
default;
279 Fixed_Rule(Fixed_Rule &&) =
default;
280 Fixed_Rule & operator = (
const Fixed_Rule &) =
delete;
282 template <
typename State>
289static_assert(std::is_nothrow_move_constructible_v<Dense_Cell_Storage<int, 2>>);
290static_assert(std::is_nothrow_move_assignable_v<Dense_Cell_Storage<int, 2>>);
291static_assert(std::is_nothrow_move_constructible_v<Bit_Cell_Storage<2>>);
292static_assert(std::is_nothrow_move_assignable_v<Ghost_Grid>);
293static_assert(std::is_nothrow_move_assignable_v<Field_Grid>);
294static_assert(std::is_nothrow_move_constructible_v<Graph_Lattice<int>>);
295static_assert(std::is_nothrow_move_constructible_v<Life>);
296static_assert(std::is_nothrow_move_assignable_v<Life>);
297static_assert(std::is_nothrow_move_assignable_v<Async_Life>);
298static_assert(std::is_nothrow_move_assignable_v<Parallel_Life>);
299static_assert(std::is_nothrow_move_assignable_v<Field_Life>);
300static_assert(std::is_nothrow_move_assignable_v<Graph_Life>);
301static_assert(std::is_nothrow_move_assignable_v<Random_Life>);
302static_assert(std::is_nothrow_move_assignable_v<Hashlife_Engine>);
303static_assert(std::is_nothrow_move_assignable_v<Tiles>);
304static_assert(std::is_nothrow_move_constructible_v<Density>);
305static_assert(std::is_nothrow_move_assignable_v<Entropy>);
306static_assert(std::is_nothrow_move_assignable_v<Locked>);
307static_assert(std::is_nothrow_move_constructible_v<Read_Locked>);
311static_assert(std::is_copy_constructible_v<Dense_Cell_Storage<int, 2>>);
312static_assert(std::is_copy_assignable_v<Life>);
313static_assert(std::is_copy_constructible_v<Density>);
314static_assert(not std::is_copy_constructible_v<Hashlife_Engine>);
315static_assert(not std::is_copy_constructible_v<Tiles>);
319static_assert(std::is_move_constructible_v<Synchronous_Engine<Grid, Fixed_Rule, Moore<2, 1>>>);
320static_assert(not std::is_move_assignable_v<Synchronous_Engine<Grid, Fixed_Rule, Moore<2, 1>>>);
374 static Ghost_Grid
make(
const size_t n)
376 Ghost_Grid g(extents_of(n), 0);
383 return g.size() == 0
and g.size(0) == 0
and g.store_extents()[0] == 0;
385 static std::tuple<ca_size_t, ca_size_t, long>
fingerprint(
const Ghost_Grid & g)
389 return {g.size(0), g.size(1),
sum};
391 static void use(Ghost_Grid & g)
396 (void) g.at_safe({-1, -1});
403 static Field_Grid
make(
const size_t n) {
return Field_Grid(extents_of(n), std::tuple{1, 2}); }
408 static std::tuple<ca_size_t, ca_size_t, long, long>
fingerprint(
const Field_Grid &
m)
415 second += m.at<1>(c);
419 static void use(Field_Grid &
m)
423 m.set<0>(c, m.at<0>(c) + 1);
424 m.set_cell(c, m.at_cell(c));
426 m.fill(std::tuple{3, 4});
445 for (
size_t i = 0; i < g.
size(); ++i)
450 return {g.
size(),
sum, degrees};
454 for (
size_t i = 0; i < g.
size(); ++i)
469 static Life
make(
const size_t n)
475 static bool is_empty(
const Life & e) {
return e.frame().size() == 0
and e.steps_run() == 0; }
476 static auto fingerprint(
const Life & e) {
return engine_print(e); }
477 static void use(Life & e) { use_engine(e); }
482 static Async_Life
make(
const size_t n)
490 return e.frame().size() == 0
and e.steps_run() == 0
and e.step_count() == 0;
492 static auto fingerprint(
const Async_Life & e) {
return engine_print(e); }
493 static void use(Async_Life & e) { use_engine(e); }
498 static Parallel_Life
make(
const size_t n)
501 cfg.
pool = &small_pool();
510 return e.frame().size() == 0
and e.steps_run() == 0
and e.config().pool == &small_pool();
512 static auto fingerprint(
const Parallel_Life & e) {
return engine_print(e); }
513 static void use(Parallel_Life & e) { use_engine(e); }
518 static Field_Life
make(
const size_t n)
520 Two_Fields lat(extents_of(n), std::tuple{0, 7});
521 if (lat.size(1) >= 3)
523 lat.set<0>({0, j}, 1);
531 return e.frame().size() == 0
and e.steps_run() == 0;
533 static std::tuple<size_t, size_t, size_t>
fingerprint(
const Field_Life & e)
538 if (e.frame().at<0>(c) != 0)
541 return {e.frame().size(), alive, e.steps_run()};
543 static void use(Field_Life & e)
545 const size_t steps = e.steps_run();
547 EXPECT_EQ(e.steps_run(),
steps + 1);
550 EXPECT_EQ(e.frame().at<1>(c), 7);
553 EXPECT_EQ(e.steps_run(),
steps + 3);
559 static Graph_Life
make(
const size_t n)
562 for (
size_t i = 0; i < n; i += 3)
570 return e.frame().size() == 0
and e.steps_run() == 0;
572 static std::tuple<size_t, size_t, size_t>
fingerprint(
const Graph_Life & e)
575 for (
size_t i = 0; i < e.frame().
size(); ++i)
576 if (e.frame().at_node(i) != 0)
578 return {e.frame().size(), alive, e.steps_run()};
580 static void use(Graph_Life & e)
582 const size_t steps = e.steps_run();
584 EXPECT_EQ(e.steps_run(),
steps + 1);
585 for (
size_t i = 0; i < e.frame().
size(); ++i)
586 EXPECT_LE(e.frame().at_node(i), 1);
588 EXPECT_EQ(e.steps_run(),
steps + 3);
597 for (
size_t i = 0; i < n; ++i)
598 h.
set_alive(
static_cast<std::int64_t
>(i % 40),
static_cast<std::int64_t
>(i / 40));
603 return h.population() == 0
and h.generation() == 0
and h.bbox().is_empty();
607 return {
h.population(),
h.generation()};
612 EXPECT_TRUE(
h.alive_at(-5, 7));
613 std::uint64_t seen = 0;
614 h.for_each_alive([&seen](std::int64_t, std::int64_t) { ++seen; });
615 EXPECT_EQ(seen,
h.population());
616 EXPECT_FALSE(
h.save_rle_string().empty());
619 EXPECT_EQ(
h.population(), 0u);
625 static Locked
make(
const size_t n)
627 Locked g = sync_slot().lock();
628 *g =
static_cast<long>(n);
631 static bool is_empty(Locked & g) {
return g.operator->() ==
nullptr; }
635 return const_cast<Locked &
>(g).operator->();
637 static void use(Locked & g)
639 if (
long * v = g.operator->())
642 EXPECT_EQ(g.get(), *v);
649 static Const_Locked
make(
const size_t n)
652 s.
with_lock([n](
long & v) { v =
static_cast<long>(n); });
653 return std::as_const(s).lock();
655 static bool is_empty(
const Const_Locked & g) {
return g.operator->() ==
nullptr; }
656 static const long *
fingerprint(
const Const_Locked & g) {
return g.operator->(); }
657 static void use(Const_Locked & g)
659 if (
const long * v = g.operator->())
668 static Read_Locked
make(
const size_t n)
674 static bool is_empty(
const Read_Locked & g) {
return g.operator->() ==
nullptr; }
675 static const long *
fingerprint(
const Read_Locked & g) {
return g.operator->(); }
676 static void use(Read_Locked & g)
678 if (
const long * v = g.operator->())
680 EXPECT_EQ(g.get(), *v);
687 static Write_Locked
make(
const size_t n)
689 Write_Locked g = rw_slot().write();
690 *g =
static_cast<long>(n);
693 static bool is_empty(Write_Locked & g) {
return g.operator->() ==
nullptr; }
697 return const_cast<Write_Locked &
>(g).operator->();
699 static void use(Write_Locked & g)
701 if (
long * v = g.operator->())
719 return not
r.has_next()
and r.rows_read() == 0
and not
r.has_header()
720 and r.header().size() == 0;
726 return {
r.has_header(),
r.header().size() > 1 ?
r.header()[1] : std::string(),
732 const size_t expected =
r.has_header() ? std::stoul(
r.header()[1]) : 0;
737 EXPECT_EQ(
r.
next().size(), 3u);
741 EXPECT_EQ(
r.rows_read(),
rows);
747 static Random_Life
make(
const size_t n)
756 return e.frame().size() == 0
and e.steps_run() == 0;
758 static auto fingerprint(
const Random_Life & e) {
return engine_print(e); }
759 static void use(Random_Life & e) { use_engine(e); }
764 static Tiles
make(
const size_t n)
766 Tiles t(tile_extents_of(n), temp_path(
"tiles"), 4);
769 t.set(r, c, static_cast<int>((r + c) % 3));
775 return t.extents()[0] == 0
and t.extents()[1] == 0
and t.tiles_rows() == 0
776 and t.resident() == 0
and t.stats().misses == 0;
779 static std::tuple<ca_size_t, ca_size_t, size_t, std::uint64_t, std::uint64_t>
782 return {t.extents()[0], t.extents()[1], t.resident(), t.stats().misses, t.stats().writes};
784 static void use(Tiles & t)
788 const int v = t.at(r, c);
790 EXPECT_EQ(t.at(r, c), v + 1);
793 EXPECT_LE(t.resident(), t.capacity());
799 static Density
make(
const size_t n)
805 static bool is_empty(
const Density & o) {
return o.size() == 0
and o.totals().size() == 0; }
806 static std::tuple<size_t, size_t, size_t>
fingerprint(
const Density & o)
810 for (
size_t i = 0; i < o.size(); ++i)
812 counts += o.counts()[i];
813 totals += o.totals()[i];
815 return {o.size(), counts, totals};
817 static void use(Density & o)
819 const size_t before = o.size();
822 EXPECT_EQ(o.size(), before + 3 + (before == 0 ? 1 : 0));
823 for (
size_t i = 0; i < o.size(); ++i)
824 EXPECT_LE(o.density_at(i), 1.0);
830 static Entropy
make(
const size_t n)
836 static bool is_empty(
const Entropy & o) {
return o.size() == 0; }
840 for (
size_t i = 0; i < o.size(); ++i)
841 sum += o.entropy()[i];
842 return {o.size(),
sum};
844 static void use(Entropy & o)
846 const size_t before = o.size();
849 EXPECT_EQ(o.size(), before + 3 + (before == 0 ? 1 : 0));
850 for (
size_t i = 0; i < o.size(); ++i)
851 EXPECT_GE(o.entropy()[i], 0.0);
858 Read_Locked, Write_Locked,
CsvReader, Random_Life, Tiles,
864template <
class Engine>
871 EXPECT_EQ(a.steps_run(), 5u);
872 EXPECT_EQ(a.frame().size(), 1000u);
873 EXPECT_EQ(b.steps_run(), 1u);
874 EXPECT_EQ(b.frame().size(), 100u);
877TEST(MovedFromEngines, AnAssignmentExchangesTheSteps)
879 expect_exchanged_steps<Life>();
880 expect_exchanged_steps<Async_Life>();
881 expect_exchanged_steps<Random_Life>();
882 expect_exchanged_steps<Parallel_Life>();
883 expect_exchanged_steps<Field_Life>();
884 expect_exchanged_steps<Graph_Life>();
889TEST(MovedFromEngines, AnEmptyRandomEngineSteps)
893 EXPECT_NO_THROW(e.run(3));
894 EXPECT_EQ(e.steps_run(), 3u);
895 EXPECT_EQ(e.frame().size(), 0u);
900TEST(MovedFromTileCache, TheMovedFromCacheTouchesNoFile)
902 Tiles src({8, 8}, temp_path(
"tiles"), 2);
904 Tiles dst(std::move(src));
905 EXPECT_THROW(src.set(5, 5, 7), std::out_of_range);
906 EXPECT_THROW((
void) src.at(0, 0), std::out_of_range);
908 EXPECT_EQ(src.stats().writes, 0u);
909 EXPECT_EQ(dst.at(1, 1), 5);
913TEST(MovedFromEngines, TheHooksGoWithTheSimulation)
917 src.on_post_step([&fired](
size_t,
const Grid &) { ++fired; });
918 Life dst(std::move(src));
920 EXPECT_EQ(fired, 0u);
922 EXPECT_EQ(fired, 1u);
928TEST(MovedFromGuards, TheLockGoesWithTheGuard)
932 std::thread other([&s]
934 for (
int i = 0; i < 1000; ++i)
937 for (
int i = 0; i < 1000; ++i)
940 Locked taken = std::move(g);
941 EXPECT_EQ(g.operator->(),
nullptr);
943 Locked last = t.
lock();
944 last = std::move(taken);
945 EXPECT_EQ(taken.operator->(),
nullptr);
949 EXPECT_EQ(*s.
lock(), 3000);
950 EXPECT_EQ(*t.
lock(), 0);
955TEST(MovedFromCsvReader, TheFileGoesWithTheReader)
957 auto src = std::make_unique<CsvReader>(
write_csv(5));
973TEST(MovedFromCsvReader, AReaderOfAStreamGivesTheStream)
975 std::istringstream in(
"a,b\n1,2\n3,4\n");
size_t size_t int32_t * out
Phase-7 observability layer for cellular automata engines.
Phase 15 tile-based out-of-core storage for Aleph::CA.
Simple dynamic array with automatic resizing and functional operations.
constexpr size_t size() const noexcept
Return the number of elements stored in the stack.
Update-scheme aware engine.
Bit-packed row-major storage for N-dimensional binary CAs.
void fill(const bool value)
Set every cell to value.
const extents_type & extents() const noexcept
Return the full extents array.
ca_size_t size() const noexcept
Row-major dense storage for N-dimensional cellular automata.
ca_size_t size() const noexcept
void fill(const T &value)
Set every cell to value.
view_type view() noexcept
Return a mutable Aleph::mdspan view of this storage.
const extents_type & extents() const noexcept
Records the count of cells in tracked_state per step.
Records the Shannon entropy of the state distribution.
Adaptor: apply a mono-field rule to field I, leave the other fields unchanged.
Lattice with Halo ghost layers around the user-visible cells.
Graph lattice: one cell per node + precomputed adjacency.
std::size_t degree(std::size_t n) const
Degree of node n.
void set(const coord_type &c, const T &v)
ca_size_t size() const noexcept
T at_node(std::size_t n) const
Direct read at node id n.
const Array< std::size_t > & neighbours(std::size_t n) const
Neighbour ids of node n in the order supplied at construction.
void set_node(std::size_t n, const T &v)
Direct write at node id n.
T at(const coord_type &c) const
std::size_t max_degree() const noexcept
Maximum degree across the graph (computed in O(N)).
void fill(const T &value)
Set every cell to value.
Synchronous double-buffered engine for graph CAs.
Hashlife engine for outer-totalistic binary cellular automata.
void set_alive(const std::int64_t x, const std::int64_t y, const bool alive=true)
Set or clear the cell at world coordinates (x, y).
Lattice that adds boundary-aware access on top of a storage.
Moore (Chebyshev) neighborhood of radius R in N dimensions.
Synchronous double-buffered engine for multi-field lattices.
Multi-field lattice with selectable storage layout.
Rule whose next state depends on (current, alive_count).
Parallel synchronous double-buffered engine.
Synchronous double-buffered engine.
Out-of-core 2D tile cache with LRU eviction.
Lazy CSV reader for large files.
Array< std::string > next()
Read the next row as Array.
void reset()
Reset to beginning (only works for file-based readers).
Array< std::string > read_header()
Read and store the header row.
bool has_next() const
Check if more rows are available.
std::uint32_t next() noexcept
RAII guard for shared (read-only) access.
RAII guard for exclusive (write) access.
Read/write-lock protected shared object wrapper.
ReadLockedPtr read() const
Acquire a shared lock and return a guard.
decltype(auto) with_write_lock(F &&f)
Execute a callback with exclusive (write) access.
RAII guard for read-only access to the synchronized value.
RAII guard for exclusive access to the synchronized value.
Mutex-protected shared object wrapper.
decltype(auto) with_lock(F &&f)
Execute a callback with exclusive access to the value.
LockedPtr lock()
Acquire an exclusive lock and return a guard.
A reusable thread pool for efficient parallel task execution.
Minimal std::expected-style result type for C++20.
constexpr index_type extent(rank_type r) const noexcept
Run-time size of axis r.
The typed suite of the moved-from tests.
constexpr size_t size() const noexcept
Returns the number of entries in the table.
Modern synchronization helpers for channels, shared state, and small producer-consumer queues.
The pattern test of the moved-from objects.
void expect_exchanged_steps()
::testing::Types< Dense_Cell_Storage< int, 2 >, Bit_Cell_Storage< 2 >, Ghost_Grid, Field_Grid, Graph_Lattice< int >, Life, Async_Life, Parallel_Life, Field_Life, Graph_Life, Hashlife_Engine, Locked, Const_Locked, Read_Locked, Write_Locked, CsvReader, Random_Life, Tiles, Density, Entropy > Engines
INSTANTIATE_TYPED_TEST_SUITE_P(Engines, MovedFrom, Engines)
void attach_observer(Engine &engine, Observer &observer)
Plug an observer into an engine's pre/post-step hooks.
constexpr Game_Of_Life_Rule make_game_of_life_rule() noexcept
Build the canonical Game of Life rule.
std::span< const T > Neighbor_View
Read-only view over a contiguous range of neighbour values.
std::ptrdiff_t ca_index_t
Signed coordinate component used by lattices and neighborhoods.
std::array< ca_index_t, N > Coord_Vec
Default coordinate vector.
void for_each_cell(const Lattice &lat, F &&f)
Visit every cell of a lattice in canonical row-major order.
Array< Array< std::size_t > > make_path_graph_adjacency(std::size_t n, bool cycle=false)
Build the adjacency of a path graph with n nodes.
void write_csv(std::ostream &out, const Lattice &frame, const CSV_Options &opts={})
Write a numeric CSV snapshot.
std::size_t ca_size_t
Unsigned size component used for extents and counts.
Main namespace for Aleph-w library functions.
size_t size(Node *root) noexcept
See compute_cardinality_rec(Node * root).
and
Check uniqueness with explicit hash + equality functors.
void next()
Advance all underlying iterators (bounds-checked).
T sum(const Container &container, const T &init=T{})
Compute sum of all elements.
Comprehensive CSV (Comma-Separated Values) parsing and manipulation utilities.
Configuration for Parallel_Synchronous_Engine.
std::size_t num_partitions
Number of partitions per step.
ThreadPool * pool
Thread pool to schedule on. nullptr means Aleph::default_pool().
std::size_t min_parallel_cells
Workloads with fewer cells than this are executed sequentially without touching the pool.
Pick one cell at random per sub-step, update it in place.
The lattice wraps around on every axis.
static void use(Async_Life &e)
static Async_Life make(const size_t n)
static auto fingerprint(const Async_Life &e)
static bool is_empty(const Async_Life &e)
static bool is_empty(const Bit_Cell_Storage< 2 > &s)
static Bit_Cell_Storage< 2 > make(const size_t n)
static void use(Bit_Cell_Storage< 2 > &s)
static std::tuple< ca_size_t, ca_size_t, size_t > fingerprint(const Bit_Cell_Storage< 2 > &s)
static Const_Locked make(const size_t n)
static void use(Const_Locked &g)
static const long * fingerprint(const Const_Locked &g)
static bool is_empty(const Const_Locked &g)
static void use(CsvReader &r)
static CsvReader make(const size_t n)
static std::tuple< bool, std::string, size_t > fingerprint(const CsvReader &r)
static bool is_empty(const CsvReader &r)
static bool is_empty(const Dense_Cell_Storage< int, 2 > &s)
static void use(Dense_Cell_Storage< int, 2 > &s)
static std::tuple< ca_size_t, ca_size_t, long > fingerprint(const Dense_Cell_Storage< int, 2 > &s)
static Dense_Cell_Storage< int, 2 > make(const size_t n)
static Density make(const size_t n)
static void use(Density &o)
static std::tuple< size_t, size_t, size_t > fingerprint(const Density &o)
static bool is_empty(const Density &o)
static void use(Entropy &o)
static std::pair< size_t, double > fingerprint(const Entropy &o)
static Entropy make(const size_t n)
static bool is_empty(const Entropy &o)
static void use(Field_Grid &m)
static std::tuple< ca_size_t, ca_size_t, long, long > fingerprint(const Field_Grid &m)
static bool is_empty(const Field_Grid &m)
static Field_Grid make(const size_t n)
static void use(Field_Life &e)
static Field_Life make(const size_t n)
static bool is_empty(const Field_Life &e)
static std::tuple< size_t, size_t, size_t > fingerprint(const Field_Life &e)
static bool is_empty(const Ghost_Grid &g)
static Ghost_Grid make(const size_t n)
static std::tuple< ca_size_t, ca_size_t, long > fingerprint(const Ghost_Grid &g)
static void use(Ghost_Grid &g)
static Graph_Lattice< int > make(const size_t n)
static std::tuple< size_t, long, size_t > fingerprint(const Graph_Lattice< int > &g)
static bool is_empty(const Graph_Lattice< int > &g)
static void use(Graph_Lattice< int > &g)
static Graph_Life make(const size_t n)
static std::tuple< size_t, size_t, size_t > fingerprint(const Graph_Life &e)
static void use(Graph_Life &e)
static bool is_empty(const Graph_Life &e)
static Hashlife_Engine make(const size_t n)
static std::pair< std::uint64_t, std::int64_t > fingerprint(const Hashlife_Engine &h)
static bool is_empty(const Hashlife_Engine &h)
static void use(Hashlife_Engine &h)
static auto fingerprint(const Life &e)
static bool is_empty(const Life &e)
static Life make(const size_t n)
static const long * fingerprint(const Locked &g)
static Locked make(const size_t n)
static void use(Locked &g)
static bool is_empty(Locked &g)
static Parallel_Life make(const size_t n)
static bool is_empty(const Parallel_Life &e)
static auto fingerprint(const Parallel_Life &e)
static void use(Parallel_Life &e)
static bool is_empty(const Random_Life &e)
static Random_Life make(const size_t n)
static void use(Random_Life &e)
static auto fingerprint(const Random_Life &e)
static Read_Locked make(const size_t n)
static const long * fingerprint(const Read_Locked &g)
static void use(Read_Locked &g)
static bool is_empty(const Read_Locked &g)
static bool is_empty(const Tiles &t)
static std::tuple< ca_size_t, ca_size_t, size_t, std::uint64_t, std::uint64_t > fingerprint(const Tiles &t)
static void use(Tiles &t)
static Tiles make(const size_t n)
static bool is_empty(Write_Locked &g)
static const long * fingerprint(const Write_Locked &g)
static void use(Write_Locked &g)
static Write_Locked make(const size_t n)
How the moved-from tests build, check and use objects of a class.
FooMap m(5, fst_unit_pair_hash, snd_unit_pair_hash)
A modern, efficient thread pool for parallel task execution.
Phase 13 update-scheme aware engine.
Bit-packed dense storage for boolean cellular automata.
Synchronous double-buffered engine for cellular automata.
Ghost-layer lattice for high-performance boundary handling.
CA whose underlying topology is an arbitrary undirected graph.
Hashlife engine for outer-totalistic binary cellular automata.
Cellular automata lattice with pluggable boundary policies.
Phase 14 synchronous double-buffered engine for multi-field cellular automata.
Phase 14 multi-field cellular automata lattice (AoS / SoA).
Phase 14 multi-field local rules for Aleph::CA.
Neighborhoods catalogue for Aleph::CA.
Parallel synchronous engine for cellular automata (Phase 5).
Rule mechanisms for Aleph::CA.
Dense, contiguous storage for cellular automata cells (1D/2D/3D).