Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Added new, non constant, functions for multi-threading applications:
  virtual void InitOnWorker() {}
  virtual void BeginRunOnWorker() {}
  virtual void FinishRunOnWorker() {}
The const functions (now deprecated) will be removed in the future:
  virtual void InitForWorker() const  {}
  virtual void BeginWorkerRun() const {}
  virtual void FinishWorkerRun() const {}
  • Loading branch information
ihrivnac committed Mar 24, 2017
commit 89b4a9a79115e83dbd84b648f43abfc35d879561
19 changes: 15 additions & 4 deletions montecarlo/vmc/inc/TVirtualMCApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,26 @@ class TVirtualMCApplication : public TNamed {
/// Define action at each step for Geane
virtual void GeaneStepping() {;}

// New functions for multi-threading applications
// Functions for multi-threading applications
/// Clone MC application on worker
virtual TVirtualMCApplication* CloneForWorker() const { return 0;}

/// Const Initialize MC application on worker - now deprecated
/// Use new non-const InitOnWorker() instead
virtual void InitForWorker() const {}
/// Const Define actions at the beginning of the worker run if needed - now deprecated
/// Use new non-const BeginRunOnWorker() instead
virtual void BeginWorkerRun() const {}
/// Const Define actions at the end of the worker run if needed - now deprecated
/// Use new non-const FinishRunOnWorker() instead
virtual void FinishWorkerRun() const {}

/// Initialize MC application on worker
virtual void InitForWorker() const {}
virtual void InitOnWorker() {}
/// Define actions at the beginning of the worker run if needed
virtual void BeginWorkerRun() const {}
virtual void BeginRunOnWorker() {}
/// Define actions at the end of the worker run if needed
virtual void FinishWorkerRun() const {}
virtual void FinishRunOnWorker() {}
/// Merge the data accumulated on workers to the master if needed
virtual void Merge(TVirtualMCApplication* /*localMCApplication*/) {}

Expand Down