Program Listing for File SimRunner.h

Return to documentation for file (include/flamegpu/simulation/detail/SimRunner.h)

#ifndef INCLUDE_FLAMEGPU_SIMULATION_DETAIL_SIMRUNNER_H_
#define INCLUDE_FLAMEGPU_SIMULATION_DETAIL_SIMRUNNER_H_

#include <atomic>
#include <memory>
#include <mutex>
#include <queue>
#include <condition_variable>
#include <map>
#include <vector>

#include "flamegpu/defines.h"
#include "flamegpu/simulation/LogFrame.h"
#include "flamegpu/simulation/detail/AbstractSimRunner.h"

namespace flamegpu {
struct ModelData;
class LoggingConfig;
class StepLoggingConfig;
class RunPlanVector;
class CUDAEnsemble;
namespace detail {

class SimRunner : public AbstractSimRunner {
    const bool fail_fast;

 public:
    SimRunner(const std::shared_ptr<const ModelData> _model,
        std::atomic<unsigned int> &_err_ct,
        std::atomic<unsigned int> &_next_run,
        const RunPlanVector &_plans,
        std::shared_ptr<const StepLoggingConfig> _step_log_config,
        std::shared_ptr<const LoggingConfig> _exit_log_config,
        int _device_id,
        unsigned int _runner_id,
        flamegpu::Verbosity _verbosity,
        bool _fail_fast,
        std::map<unsigned int, RunLog> &run_logs,
        std::queue<unsigned int> &log_export_queue,
        std::mutex &log_export_queue_mutex,
        std::condition_variable &log_export_queue_cdn,
        std::vector<ErrorDetail> &err_detail,
        unsigned int _total_runners,
        bool _isSWIG);
    void main() override;
};

}  // namespace detail
}  // namespace flamegpu

#endif  // INCLUDE_FLAMEGPU_SIMULATION_DETAIL_SIMRUNNER_H_