Peano
Loading...
Searching...
No Matches
DependencyChecks.h File Reference
#include "exaparty/kernels/ParticleUpdatePredicates.h"
#include <string>
#include <type_traits>
#include "../dependencychecks/DependencyChecks.cpph"
Include dependency graph for DependencyChecks.h:

Go to the source code of this file.

Namespaces

namespace  exaparty
 This file is part of the ExaParty project.
namespace  Dependency
 checks
namespace  exaparty::dependencychecks
namespace  exaparty::dependencychecks::internal

Typedefs

template<typename ParticleContainer>
using exaparty::dependencychecks::PCParticle
template<typename ParticleContainer>
using exaparty::dependencychecks::PCAlgorithmStepEnum
template<typename ParticleContainer>
using exaparty::dependencychecks::PCInitStepEnum
template<typename ParticleContainer>
using exaparty::dependencychecks::PCSweepStageEnum
template<typename Particle>
using exaparty::dependencychecks::PAlgorithmStepEnum
template<typename Particle>
using exaparty::dependencychecks::PInitStepEnum
template<typename Particle>
using exaparty::dependencychecks::PSweepStageEnum

Enumerations

enum class  exaparty::dependencychecks::Invariant {
  exaparty::dependencychecks::TouchFirstUsage_MaskOutAfterwards_AllPreviousStepsUpdateAtLeastOnce , exaparty::dependencychecks::TouchFirstUsage_MaskOutAfterwards_AllPreviousStepsUpdateAtLeastOnce_SweepMayRerun , exaparty::dependencychecks::TouchAtMostOnce_MaskOutOtherwise_AllPreviousStepsUpdateAtLeastOnce , exaparty::dependencychecks::TouchAtMostOnce_MaskOutOtherwise_AllPreviousStepsUpdateAtLeastOnce_SweepMayRerun ,
  exaparty::dependencychecks::TouchAtLeastOnce_AllPreviousStepsUpdateAtLeastOnce , exaparty::dependencychecks::TouchAtLeastOnce_AllPreviousStepsUpdateAtLeastOnce_FutureStagesMayUpdate , exaparty::dependencychecks::TouchAtLeastOnce_AllPreviousStepsUpdateAtLeastOnce_MayOverwritePreviousCellUpdatesFromSameSweep , exaparty::dependencychecks::TouchAtLeastOnce_AllPreviousStepsUpdateAtLeastOnce_MayOverwritePreviousCellUpdatesFromSameSweep_FutureStagesMayUpdate
}
 Different invariants that have to hold for the code. More...

Functions

std::string exaparty::dependencychecks::toString (Invariant policy)
bool exaparty::dependencychecks::internal::isValid (Invariant policy, bool workOnParticle, bool particleIsLocal, int numberOfUpdates, int numberOfMaskOuts)
 Is current state that's to be updated valid.
bool exaparty::dependencychecks::internal::previousStepsAllHaveToAccessAtLeastOnce (Invariant policy)
 Do all previous steps have to alter state at least once.
int exaparty::dependencychecks::internal::firstFutureStepThatHasToBeCleared (Invariant policy, int numberOfSteps)
 Which future steps should be checked.
template<typename Particle>
static std::string exaparty::dependencychecks::internal::outputParticle (const Particle *particle, PAlgorithmStepEnum< Particle > algorithmStep, PSweepStageEnum< Particle > sweepStageMarkerEnum, const int errors)
 This function is meant to be called on a particle on which dependency issues in the main algorithm steps have been detected.
template<typename Particle>
static std::string exaparty::dependencychecks::internal::outputParticle (const Particle *particle, PInitStepEnum< Particle > algorithmStep, PSweepStageEnum< Particle > sweepStageMarkerEnum, const int errors)
int exaparty::dependencychecks::internal::checkPastStages (Invariant policy, bool isLocal, const int currentStep, const int currentStage, const int nsteps, const int nstages, const int *sweepStateProgression)
 Check that all previous steps and stages.
int exaparty::dependencychecks::internal::checkFutureStages (Invariant policy, const int currentStep, const int currentStage, const int nsteps, const int nstages, const int *sweepStateProgression)
 Check that all steps and stages after the current one have not been done yet.
template<typename ParticleContainer>
static void exaparty::dependencychecks::markAlgorithmStep (const ParticleContainer &particles, const peano4::datamanagement::VertexMarker &marker, PCAlgorithmStepEnum< ParticleContainer > algorithmStepMarkerEnum, PCSweepStageEnum< ParticleContainer > sweepStageMarkerEnum, Invariant policy, ::exaparty::kernels::UpdateParticleAssignedToVertexPredicate< PCParticle< ParticleContainer > > workOnParticle, int spacetreeId)
 Mark a localParticle having entered a sweep stage in a main algorithm step.
template<typename ParticleContainer>
static void exaparty::dependencychecks::markAlgorithmStep (const ParticleContainer &localParticles, const ParticleContainer &activeParticles, const peano4::datamanagement::CellMarker &marker, PCAlgorithmStepEnum< ParticleContainer > algorithmStepMarkerEnum, PCSweepStageEnum< ParticleContainer > sweepStageMarkerEnum, Invariant policy, ::exaparty::kernels::UpdateParticlePairWithinCellPredicate< typename std::remove_pointer< typename ParticleContainer::value_type >::type > workOnParticle, int spacetreeId)
 A particle is marked if there is at least one active interaction in this cell.
template<typename ParticleContainer>
static void exaparty::dependencychecks::markInitStep (const ParticleContainer &localParticles, const peano4::datamanagement::VertexMarker &marker, PCInitStepEnum< ParticleContainer > initStepMarkerEnum, PCSweepStageEnum< ParticleContainer > sweepStageMarkerEnum, Invariant policy, ::exaparty::kernels::UpdateParticleAssignedToVertexPredicate< PCParticle< ParticleContainer > > workOnParticle, int spacetreeId)
 Mark a localParticle having entered a sweep stage in a initialisation algorithm step.
template<typename ParticleContainer>
static void exaparty::dependencychecks::markInitStep (const ParticleContainer &localParticles, const ParticleContainer &activeParticles, const peano4::datamanagement::CellMarker &marker, PCInitStepEnum< ParticleContainer > initStepMarkerEnum, PCSweepStageEnum< ParticleContainer > sweepStageMarkerEnum, Invariant policy, ::exaparty::kernels::UpdateParticlePairWithinCellPredicate< PCParticle< ParticleContainer > > workOnParticle, int spacetreeId)
 A particle is marked if there is at least one active interaction in this cell.
template<typename ParticleContainer>
static void exaparty::dependencychecks::checkAlgorithmStep (Invariant policy, const ParticleContainer &localParticles, const ParticleContainer &activeParticles, const peano4::datamanagement::CellMarker &marker, PCAlgorithmStepEnum< ParticleContainer > algorithmStepMarkerEnum, PCSweepStageEnum< ParticleContainer > sweepStageMarkerEnum, ::exaparty::kernels::UpdateParticlePairWithinCellPredicate< PCParticle< ParticleContainer > > workOnParticle, int spacetreeId)
 Dependency Check: Verify that particles have completed all the algorithm steps and stages of the main algorithm steps before the current one.
template<typename ParticleContainer>
static void exaparty::dependencychecks::checkAlgorithmStep (Invariant policy, const ParticleContainer &localParticles, const peano4::datamanagement::VertexMarker &marker, PCAlgorithmStepEnum< ParticleContainer > algorithmStepMarkerEnum, PCSweepStageEnum< ParticleContainer > sweepStageMarkerEnum, ::exaparty::kernels::UpdateParticleAssignedToVertexPredicate< PCParticle< ParticleContainer > > workOnParticle, int spacetreeId)
template<typename ParticleContainer>
static void exaparty::dependencychecks::checkParticlesAssignedToVertexInTouchLastTimeAlgorithmStep (Invariant policy, const ParticleContainer &assignedParticles, PCAlgorithmStepEnum< ParticleContainer > algorithmStepMarkerEnum, int spacetreeId)
 Dependency Check: At the final stage of a sweep, i.e.
template<typename ParticleContainer>
static void exaparty::dependencychecks::checkInitStep (Invariant policy, const ParticleContainer &localParticles, const peano4::datamanagement::VertexMarker &marker, PCInitStepEnum< ParticleContainer > initStepMarkerEnum, PCSweepStageEnum< ParticleContainer > sweepStageMarkerEnum, ::exaparty::kernels::UpdateParticleAssignedToVertexPredicate< PCParticle< ParticleContainer > > workOnParticle, int spacetreeId)
 Dependency Check: Verify that particles have completed all the algorithm steps and stages of the initialisation algorithm steps before the current one.
template<typename ParticleContainer>
static void exaparty::dependencychecks::checkInitStep (Invariant policy, const ParticleContainer &localParticles, const ParticleContainer &activeParticles, const peano4::datamanagement::CellMarker &marker, PCInitStepEnum< ParticleContainer > initStepMarkerEnum, PCSweepStageEnum< ParticleContainer > sweepStageMarkerEnum, ::exaparty::kernels::UpdateParticlePairWithinCellPredicate< PCParticle< ParticleContainer > > workOnParticle, int spacetreeId)
template<typename ParticleContainer>
static void exaparty::dependencychecks::checkParticlesAssignedToVertexInTouchLastTimeInitStep (Invariant policy, const ParticleContainer &activeParticles, PCInitStepEnum< ParticleContainer > initStepMarkerEnum, int spacetreeId)
 Dependency Check: At the final stage of a sweep (TouchVertexLastTime), check that all ActiveParticles have completed all their dependencies, i.e.
template<typename ParticleContainer>
static void exaparty::dependencychecks::clearDependencyChecksAlgorithmStep (const ParticleContainer &localParticles)
 Clear the dependency check counters of the main algorithm step dependency checks.
template<typename ParticleContainer>
static void exaparty::dependencychecks::clearDependencyChecksInitStep (const ParticleContainer &localParticles)
 Clear the dependency check counters of the initialisation step dependency checks.