Import Geant4 10.3.0.beta source tree
This commit is contained in:
+11
-10
@@ -39,20 +39,20 @@
|
||||
// History:
|
||||
// Nov 4th, 2013 A. Dotti - First Implementation
|
||||
|
||||
#ifndef TBBMASTERRUNMANAGER_HH
|
||||
#define TBBMASTERRUNMANAGER_HH
|
||||
#ifndef SIMPLETBBMASTERRUNMANAGER_HH
|
||||
#define SIMPLETBBMASTERRUNMANAGER_HH
|
||||
|
||||
#include "G4MTRunManager.hh"
|
||||
#include <tbb/task.h>
|
||||
|
||||
class tbbMasterRunManager : public G4MTRunManager {
|
||||
class SimpleTbbMasterRunManager : public G4MTRunManager {
|
||||
public:
|
||||
tbbMasterRunManager();
|
||||
//Default construct, tasklist is the tbb::task_list
|
||||
//where the created tasks will be added to
|
||||
//nEvents is the number of events each tbb::task is
|
||||
//responsible for
|
||||
virtual ~tbbMasterRunManager();
|
||||
SimpleTbbMasterRunManager(); // G4RunManagerKernel* existingRMK=0);
|
||||
// Default constructor,
|
||||
// tasklist is the tbb::task_list to which the created tasks will be added.
|
||||
// nEvents is the number of events for which each tbb::task is responsible
|
||||
//
|
||||
virtual ~SimpleTbbMasterRunManager();
|
||||
virtual void RunTermination();
|
||||
void SetTaskList( tbb::task_list* tl ) { theTasks = tl; }
|
||||
//Set a reference to the output task list where new tasks will
|
||||
@@ -72,7 +72,8 @@ protected:
|
||||
virtual void WaitForEndEventLoopWorkers() {}
|
||||
virtual void ThisWorkerReady() {}
|
||||
virtual void ThisWorkerEndEventLoop() {}
|
||||
virtual WorkerActionRequest ThisWorkerWaitForNextAction() { return UNDEFINED; }
|
||||
virtual WorkerActionRequest ThisWorkerWaitForNextAction()
|
||||
{ return WorkerActionRequest::UNDEFINED; }
|
||||
virtual void NewActionRequest( WorkerActionRequest /*newRequest*/ ) {}
|
||||
private:
|
||||
tbb::task_list* theTasks;
|
||||
@@ -37,12 +37,13 @@ public:
|
||||
tbbTask(G4int anId, tbb::concurrent_queue<const G4Run*>* output=0 , G4int nEvts = 1 );
|
||||
virtual ~tbbTask();
|
||||
tbb::task* execute();
|
||||
|
||||
unsigned int GetSlotId(); //
|
||||
private:
|
||||
G4int nEvents;
|
||||
G4int thisID;
|
||||
tbb::concurrent_queue<const G4Run*>* output;
|
||||
G4bool beamOnCondition;
|
||||
G4int m_nEvents;
|
||||
G4int m_taskID;
|
||||
tbb::concurrent_queue<const G4Run*>* m_output;
|
||||
G4bool m_beamOnCondition;
|
||||
};
|
||||
|
||||
|
||||
#endif //TBBTASK_HH
|
||||
#endif //TBBTASK_HH
|
||||
@@ -29,7 +29,7 @@
|
||||
// This class implements the worker model run manager for TBB based
|
||||
// application.
|
||||
// It is instantiated by tbbUserWorkerInitialization and used by
|
||||
// tbbMasterRunManager.
|
||||
// SimpleTbbMasterRunManager.
|
||||
// See G4WorkerRunManager for documentation of methods relative to
|
||||
// base class. Only class specific methods are documented here.
|
||||
//
|
||||
@@ -38,6 +38,7 @@
|
||||
//
|
||||
// History:
|
||||
// Oct 31st, 2013 A. Dotti - First Implementation
|
||||
// May 12th, 2014 J. Apostolakis - Additional methods/functionality
|
||||
|
||||
#ifndef TBBWORKERRUNMANAGER_HH
|
||||
#define TBBWORKERRUNMANAGER_HH
|
||||
|
||||
Reference in New Issue
Block a user