|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Coverage tests for Aleph::CA::Parallel_Synchronous_Engine (Phase 5).
More...
#include <array>#include <cstdint>#include <random>#include <vector>#include <gtest/gtest.h>#include <thread_pool.H>#include <ca-tiling.H>#include <ca-traits.H>#include <tpl_ca_concepts.H>#include <tpl_ca_bit_storage.H>#include <tpl_ca_engine.H>#include <tpl_ca_ghost_lattice.H>#include <tpl_ca_lattice.H>#include <tpl_ca_neighborhood.H>#include <tpl_ca_parallel_engine.H>#include <tpl_ca_rule.H>#include <tpl_ca_storage.H>Go to the source code of this file.
Functions | |
| TEST (CATiling, SplitRangeBalancedExactDivision) | |
| TEST (CATiling, SplitRangeBalancedRemainder) | |
| TEST (CATiling, SplitRangeBalancedEdgeCases) | |
| TEST (CATiling, RowPartitionCoversEveryIndexExactlyOnce) | |
| TEST (CATiling, BlockPartition2DCoversEveryCellOnce) | |
| TEST (CATiling, MortonEncodeRoundTripBits) | |
| TEST (CATiling, ShouldRunSequentialBelowThreshold) | |
| template<typename L > | |
| static void | seed_random (L &lat, std::uint32_t seed, double density=0.4) |
| template<typename L > | |
| static bool | frames_equal (const L &a, const L &b) |
| template<typename Lattice , typename Rule , typename Neighborhood > | |
| static void | expect_engine_equivalence (const Lattice &seed, Rule rule, Neighborhood nh, std::size_t steps, std::size_t partitions, std::size_t min_cells=0) |
| TEST (CAParallelEngine, GameOfLifeToroidalEquivalence) | |
| TEST (CAParallelEngine, GameOfLifeOpenBoundaryEquivalence) | |
| TEST (CAParallelEngine, GameOfLifeReflectiveEquivalence) | |
| TEST (CAParallelEngine, GameOfLifeConstantBoundaryEquivalence) | |
| TEST (CAParallelEngine, GameOfLifeNeumannEquivalence) | |
| TEST (CAParallelEngine, GhostLatticeToroidalEquivalence) | |
| TEST (CAParallelEngine, GhostLatticeReflectiveEquivalence) | |
| TEST (CAParallelEngine, TotalisticVonNeumannRadius2Equivalence) | |
| TEST (CAParallelEngine, TileOrderEquivalence) | |
| TEST (CAParallelEngine, Wolfram1DEquivalence) | |
| TEST (CAParallelEngine, ThreeDOuterTotalisticEquivalence) | |
| TEST (CAParallelEngine, SequentialFallbackBelowThreshold) | |
| TEST (CAParallelEngine, HookFiringSemantics) | |
| TEST (CAParallelEngine, CustomThreadPoolInjection) | |
| TEST (CAParallelEngine, DeterminismAcrossRepeatedRuns) | |
| TEST (CAParallelEngine, GliderTrajectoryIsExact) | |
| TEST (CAParallelEngine, BlinkerOscillatesUnderEveryPartitionCount) | |
| TEST (CAParallelEngine, RankOneEquivalenceSmallLattice) | |
| TEST (CAParallelEngine, BitCellStorageRunsConcurrentlyWithoutDataRaces) | |
Coverage tests for Aleph::CA::Parallel_Synchronous_Engine (Phase 5).
Scope:
split_range_balanced, Row_Partition, Block_Partition_2D, Morton helpers).Lattice (toroidal, open, reflective, constant, neumann boundaries).Ghost_Lattice (toroidal & reflective).Von_Neumann<2,2> neighbourhood.Tile<W,H> iteration order.ThreadPool injection. Definition in file tpl_ca_parallel_engine_test.cc.
|
static |
Definition at line 259 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::Synchronous_Engine< Lattice, Rule, Neighborhood, Order >::frame(), Aleph::CA::Parallel_Synchronous_Engine< Lattice, Rule, Neighborhood, Order >::frame(), Aleph::CA::frames_equal(), Aleph::CA::Parallel_Engine_Config::num_partitions, Aleph::CA::Synchronous_Engine< Lattice, Rule, Neighborhood, Order >::run(), Aleph::CA::Parallel_Synchronous_Engine< Lattice, Rule, Neighborhood, Order >::run(), seed, steps, Aleph::CA::Synchronous_Engine< Lattice, Rule, Neighborhood, Order >::steps_run(), and Aleph::CA::Parallel_Synchronous_Engine< Lattice, Rule, Neighborhood, Order >::steps_run().
Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
static |
Definition at line 211 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and k.
|
static |
| TEST | ( | CAParallelEngine | , |
| BitCellStorageRunsConcurrentlyWithoutDataRaces | |||
| ) |
Definition at line 604 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::frames_equal(), Aleph::CA::make_game_of_life_rule(), Aleph::CA::Parallel_Engine_Config::num_partitions, Aleph::CA::Parallel_Synchronous_Engine< Lattice, Rule, Neighborhood, Order >::run(), seed, and seed_random().
| TEST | ( | CAParallelEngine | , |
| BlinkerOscillatesUnderEveryPartitionCount | |||
| ) |
Definition at line 567 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::frames_equal(), Aleph::CA::make_game_of_life_rule(), Aleph::CA::Parallel_Engine_Config::num_partitions, Aleph::CA::Parallel_Synchronous_Engine< Lattice, Rule, Neighborhood, Order >::run(), and seed.
| TEST | ( | CAParallelEngine | , |
| CustomThreadPoolInjection | |||
| ) |
Definition at line 492 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::frames_equal(), Aleph::CA::make_game_of_life_rule(), Aleph::CA::Parallel_Engine_Config::pool, Aleph::CA::Synchronous_Engine< Lattice, Rule, Neighborhood, Order >::run(), seed, and seed_random().
| TEST | ( | CAParallelEngine | , |
| DeterminismAcrossRepeatedRuns | |||
| ) |
Definition at line 515 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::frames_equal(), Aleph::CA::make_game_of_life_rule(), Aleph::CA::Parallel_Engine_Config::num_partitions, Aleph::CA::Parallel_Synchronous_Engine< Lattice, Rule, Neighborhood, Order >::run(), seed, and seed_random().
| TEST | ( | CAParallelEngine | , |
| GameOfLifeConstantBoundaryEquivalence | |||
| ) |
Definition at line 317 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), expect_engine_equivalence(), Aleph::CA::make_game_of_life_rule(), seed, and seed_random().
| TEST | ( | CAParallelEngine | , |
| GameOfLifeNeumannEquivalence | |||
| ) |
Definition at line 327 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), expect_engine_equivalence(), Aleph::CA::make_game_of_life_rule(), seed, and seed_random().
| TEST | ( | CAParallelEngine | , |
| GameOfLifeOpenBoundaryEquivalence | |||
| ) |
Definition at line 297 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), expect_engine_equivalence(), Aleph::CA::make_game_of_life_rule(), seed, and seed_random().
| TEST | ( | CAParallelEngine | , |
| GameOfLifeReflectiveEquivalence | |||
| ) |
Definition at line 307 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), expect_engine_equivalence(), Aleph::CA::make_game_of_life_rule(), seed, and seed_random().
| TEST | ( | CAParallelEngine | , |
| GameOfLifeToroidalEquivalence | |||
| ) |
Definition at line 287 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), expect_engine_equivalence(), Aleph::CA::make_game_of_life_rule(), seed, and seed_random().
| TEST | ( | CAParallelEngine | , |
| GhostLatticeReflectiveEquivalence | |||
| ) |
Definition at line 347 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), expect_engine_equivalence(), Aleph::CA::make_game_of_life_rule(), seed, and seed_random().
| TEST | ( | CAParallelEngine | , |
| GhostLatticeToroidalEquivalence | |||
| ) |
Definition at line 337 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), expect_engine_equivalence(), Aleph::CA::make_game_of_life_rule(), seed, and seed_random().
| TEST | ( | CAParallelEngine | , |
| GliderTrajectoryIsExact | |||
| ) |
Definition at line 537 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::frames_equal(), Aleph::CA::make_game_of_life_rule(), Aleph::CA::Parallel_Engine_Config::num_partitions, Aleph::CA::Parallel_Synchronous_Engine< Lattice, Rule, Neighborhood, Order >::run(), and seed.
| TEST | ( | CAParallelEngine | , |
| HookFiringSemantics | |||
| ) |
Definition at line 460 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::make_game_of_life_rule(), Aleph::CA::Parallel_Engine_Config::num_partitions, Aleph::CA::Parallel_Synchronous_Engine< Lattice, Rule, Neighborhood, Order >::on_pre_step(), seed, and seed_random().
| TEST | ( | CAParallelEngine | , |
| RankOneEquivalenceSmallLattice | |||
| ) |
Definition at line 589 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), expect_engine_equivalence(), Aleph::CA::make_wolfram_elementary_rule(), and seed.
| TEST | ( | CAParallelEngine | , |
| SequentialFallbackBelowThreshold | |||
| ) |
Definition at line 434 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::frames_equal(), Aleph::CA::make_game_of_life_rule(), Aleph::CA::Parallel_Engine_Config::num_partitions, Aleph::CA::Synchronous_Engine< Lattice, Rule, Neighborhood, Order >::run(), and seed.
| TEST | ( | CAParallelEngine | , |
| ThreeDOuterTotalisticEquivalence | |||
| ) |
Definition at line 411 of file tpl_ca_parallel_engine_test.cc.
References Aleph::and, Aleph::blossom_maximum_cardinality_matching(), expect_engine_equivalence(), seed, and seed_random().
| TEST | ( | CAParallelEngine | , |
| TileOrderEquivalence | |||
| ) |
Definition at line 371 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::frames_equal(), Aleph::CA::make_game_of_life_rule(), Aleph::CA::Parallel_Engine_Config::num_partitions, Aleph::CA::Parallel_Synchronous_Engine< Lattice, Rule, Neighborhood, Order >::run(), seed, and seed_random().
| TEST | ( | CAParallelEngine | , |
| TotalisticVonNeumannRadius2Equivalence | |||
| ) |
Definition at line 357 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), expect_engine_equivalence(), seed, seed_random(), and Aleph::sum().
| TEST | ( | CAParallelEngine | , |
| Wolfram1DEquivalence | |||
| ) |
Definition at line 394 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), expect_engine_equivalence(), Aleph::CA::make_wolfram_elementary_rule(), and seed.
| TEST | ( | CATiling | , |
| BlockPartition2DCoversEveryCellOnce | |||
| ) |
Definition at line 132 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::Block_Partition_2D::factor_partitions(), h, row, and Aleph::CA::Block_Partition_2D::tile().
| TEST | ( | CATiling | , |
| MortonEncodeRoundTripBits | |||
| ) |
Definition at line 151 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::CA::morton_encode_2d().
| TEST | ( | CATiling | , |
| RowPartitionCoversEveryIndexExactlyOnce | |||
| ) |
Definition at line 118 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), h, r, and Aleph::CA::Row_Partition< Rank >::slab().
| TEST | ( | CATiling | , |
| ShouldRunSequentialBelowThreshold | |||
| ) |
Definition at line 162 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::CA::should_run_sequential().
| TEST | ( | CATiling | , |
| SplitRangeBalancedEdgeCases | |||
| ) |
Definition at line 108 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), out, and Aleph::CA::split_range_balanced().
| TEST | ( | CATiling | , |
| SplitRangeBalancedExactDivision | |||
| ) |
Definition at line 81 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), r, and Aleph::CA::split_range_balanced().
| TEST | ( | CATiling | , |
| SplitRangeBalancedRemainder | |||
| ) |
Definition at line 93 of file tpl_ca_parallel_engine_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::CA::split_range_balanced().