28 namespace dependencychecks {
47 template <
typename ParticleContainer>
49 typename ParticleContainer::value_type>::type;
51 template <
typename ParticleContainer>
53 ParticleContainer>::DependencyChecksAlgorithmStepLastUpdated;
55 template <
typename ParticleContainer>
57 ParticleContainer>::DependencyChecksInitStepLastUpdated;
59 template <
typename ParticleContainer>
61 ParticleContainer>::DependencyChecksPeanoEventUsedBySwift;
63 template <
typename Particle>
65 Particle>::type::DependencyChecksAlgorithmStepLastUpdated;
67 template <
typename Particle>
69 Particle>::type::DependencyChecksInitStepLastUpdated;
71 template <
typename Particle>
73 Particle>::type::DependencyChecksPeanoEventUsedBySwift;
166 template <
typename Particle>
168 const Particle* particle,
174 template <
typename Particle>
176 const Particle* particle,
204 const int currentStep,
205 const int currentStage,
208 const int* sweepStateProgression
227 const int currentStep,
228 const int currentStage,
231 const int* sweepStateProgression
270 template <
typename ParticleContainer>
272 const ParticleContainer& particles,
289 template <
typename ParticleContainer>
291 const ParticleContainer& localParticles,
292 const ParticleContainer& activeParticles,
298 typename std::remove_pointer<
299 typename ParticleContainer::value_type>::type> workOnParticle,
326 template <
typename ParticleContainer>
328 const ParticleContainer& localParticles,
345 template <
typename ParticleContainer>
347 const ParticleContainer& localParticles,
348 const ParticleContainer& activeParticles,
385 template <
typename ParticleContainer>
388 const ParticleContainer& localParticles,
389 const ParticleContainer& activeParticles,
399 template <
typename ParticleContainer>
402 const ParticleContainer& localParticles,
437 template <
typename ParticleContainer>
440 const ParticleContainer& assignedParticles,
472 template <
typename ParticleContainer>
475 const ParticleContainer& localParticles,
485 template <
typename ParticleContainer>
488 const ParticleContainer& localParticles,
489 const ParticleContainer& activeParticles,
507 template <
typename ParticleContainer>
510 const ParticleContainer& activeParticles,
523 template <
typename ParticleContainer>
525 const ParticleContainer& localParticles
536 template <
typename ParticleContainer>
538 const ParticleContainer& localParticles
546#include "../dependencychecks/DependencyChecks.cpph"
int firstFutureStepThatHasToBeCleared(Invariant policy, int numberOfSteps)
Which future steps should be checked.
bool previousStepsAllHaveToAccessAtLeastOnce(Invariant policy)
Do all previous steps have to alter state at least once.
int 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.
static std::string 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 st...
bool isValid(Invariant policy, bool workOnParticle, bool particleIsLocal, int numberOfUpdates, int numberOfMaskOuts)
Is current state that's to be updated valid.
int 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.
static void 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...
std::string toString(Invariant policy)
Invariant
Different invariants that have to hold for the code.
@ TouchAtLeastOnce_AllPreviousStepsUpdateAtLeastOnce_FutureStagesMayUpdate
@ TouchAtLeastOnce_AllPreviousStepsUpdateAtLeastOnce_MayOverwritePreviousCellUpdatesFromSameSweep
@ TouchFirstUsage_MaskOutAfterwards_AllPreviousStepsUpdateAtLeastOnce_SweepMayRerun
@ TouchAtMostOnce_MaskOutOtherwise_AllPreviousStepsUpdateAtLeastOnce_SweepMayRerun
@ TouchAtLeastOnce_AllPreviousStepsUpdateAtLeastOnce
@ TouchAtLeastOnce_AllPreviousStepsUpdateAtLeastOnce_MayOverwritePreviousCellUpdatesFromSameSweep_FutureStagesMayUpdate
@ TouchAtMostOnce_MaskOutOtherwise_AllPreviousStepsUpdateAtLeastOnce
@ TouchFirstUsage_MaskOutAfterwards_AllPreviousStepsUpdateAtLeastOnce
static void clearDependencyChecksInitStep(const ParticleContainer &localParticles)
Clear the dependency check counters of the initialisation step dependency checks.
static void 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...
static void 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 init...
PCParticle< ParticleContainer >::DependencyChecksInitStepLastUpdated PCInitStepEnum
static void 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.
typename std::remove_pointer< typename ParticleContainer::value_type >::type PCParticle
static void checkParticlesAssignedToVertexInTouchLastTimeAlgorithmStep(Invariant policy, const ParticleContainer &assignedParticles, PCAlgorithmStepEnum< ParticleContainer > algorithmStepMarkerEnum, int spacetreeId)
Dependency Check: At the final stage of a sweep, i.e.
typename std::remove_pointer< Particle >::type::DependencyChecksAlgorithmStepLastUpdated PAlgorithmStepEnum
PCParticle< ParticleContainer >::DependencyChecksAlgorithmStepLastUpdated PCAlgorithmStepEnum
static void 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.
typename std::remove_pointer< Particle >::type::DependencyChecksInitStepLastUpdated PInitStepEnum
PCParticle< ParticleContainer >::DependencyChecksPeanoEventUsedBySwift PCSweepStageEnum
static void clearDependencyChecksAlgorithmStep(const ParticleContainer &localParticles)
Clear the dependency check counters of the main algorithm step dependency checks.
typename std::remove_pointer< Particle >::type::DependencyChecksPeanoEventUsedBySwift PSweepStageEnum
std::function< bool(const peano4::datamanagement::CellMarker &marker, const Particle &localParticle, const Particle &activeParticle)> UpdateParticlePairWithinCellPredicate
std::function< bool(const peano4::datamanagement::VertexMarker &marker, const Particle &localParticle)> UpdateParticleAssignedToVertexPredicate
This file is part of the ExaParty project.
Vertex marker to provide information about selected vertex.