seapodym-parallel
Fish dynamics models with parameter estimations
Loading...
Searching...
No Matches
SeapodymCohortManager Class Reference

The SeapodymTaskManager knows how to distribute task cohorts across workers, how many times a cohort task needs to be executed and what the next cohort task should be given to a worker. More...

#include <SeapodymCohortManager.h>

Public Member Functions

 SeapodymCohortManager (int numAgeGroups, int numWorkers, int numTimeSteps)
std::vector< int > getInitCohortIds (int workerId) const
int getNumSteps (int cohortId) const
std::set< int > getDependencies (int cohortId) const
int getNextCohort (int cohortId) const
int getNewCohortWorker (int timeStep) const

Detailed Description

The SeapodymTaskManager knows how to distribute task cohorts across workers, how many times a cohort task needs to be executed and what the next cohort task should be given to a worker.

Class SeapodymCohortManager

Constructor & Destructor Documentation

◆ SeapodymCohortManager()

SeapodymCohortManager::SeapodymCohortManager ( int numAgeGroups,
int numWorkers,
int numTimeSteps )

Constructor

Parameters
numAgeGroupsnumber of age groups that are run concurrently
numWorkersnumber of workers
numTimeStepstotal number of time steps of the simulation
Returns
list of cohort tasks

Member Function Documentation

◆ getDependencies()

std::set< int > SeapodymCohortManager::getDependencies ( int cohortId) const

Get the dependencies of a new cohort task on other preceding cohorts

Parameters
cohortIdcohort task ID
Returns
all the other cohort tasks that feed into this cohort task

◆ getInitCohortIds()

std::vector< int > SeapodymCohortManager::getInitCohortIds ( int workerId) const

Get the initial list of cohort tasks

Parameters
workerIdworker ID
Returns
list

◆ getNewCohortWorker()

int SeapodymCohortManager::getNewCohortWorker ( int timeStep) const

Get the worker ID for the new cohort

Parameters
timeStepcurrent time step
Returns
number

◆ getNextCohort()

int SeapodymCohortManager::getNextCohort ( int cohortId) const

Get the cohort task that follows a terminated cohort task

Parameters
cohortIdcohort task ID
Returns
the next cohort task

◆ getNumSteps()

int SeapodymCohortManager::getNumSteps ( int cohortId) const

Get the number of current steps a cohort task will run

Parameters
cohortIdcohort task ID
Returns
number of steps

The documentation for this class was generated from the following files: