![]() |
The Gaudi Framework
v28r0
|
Please refer to the full documentation of the methods for more details. More...
#include <GaudiHive/src/IOBoundAlgSchedulerSvc.h>


Public Member Functions | |
| IOBoundAlgSchedulerSvc (const std::string &name, ISvcLocator *svc) | |
| Constructor. More... | |
| ~IOBoundAlgSchedulerSvc () override | |
| Destructor. More... | |
| StatusCode | initialize () override |
| Initialise. More... | |
| StatusCode | finalize () override |
| Finalise. More... | |
| StatusCode | push (IAlgTask &task) override |
| Add an algorithm to local queue to run on accelerator. More... | |
Public Member Functions inherited from extends< BASE, Interfaces > | |
| void * | i_cast (const InterfaceID &tid) const override |
| Implementation of IInterface::i_cast. More... | |
| StatusCode | queryInterface (const InterfaceID &ti, void **pp) override |
| Implementation of IInterface::queryInterface. More... | |
| std::vector< std::string > | getInterfaceNames () const override |
| Implementation of IInterface::getInterfaceNames. More... | |
| ~extends () override=default | |
| Virtual destructor. More... | |
Public Member Functions inherited from extend_interfaces< Interfaces... > | |
| ~extend_interfaces () override=default | |
| Virtual destructor. More... | |
Private Types | |
| typedef std::function< StatusCode()> | action |
Private Member Functions | |
| void | activate () |
| Activate scheduler. More... | |
| StatusCode | deactivate () |
| Deactivate scheduler. More... | |
Private Attributes | |
| bool | m_isActive |
| Flag to track if the scheduler is active or not. More... | |
| std::thread | m_thread |
| The thread in which the activate function runs. More... | |
| tbb::concurrent_bounded_queue< action > | m_actionsQueue |
| This is done since the copy of the lambda storage is too expensive. More... | |
Additional Inherited Members | |
Public Types inherited from extends< BASE, Interfaces > | |
| using | base_class = extends |
| Typedef to this class. More... | |
| using | extend_interfaces_base = extend_interfaces< Interfaces... > |
| Typedef to the base of this class. More... | |
Public Types inherited from extend_interfaces< Interfaces... > | |
| using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type |
| take union of the ext_iids of all Interfaces... More... | |
Please refer to the full documentation of the methods for more details.
Definition at line 25 of file IOBoundAlgSchedulerSvc.h.
|
private |
Definition at line 60 of file IOBoundAlgSchedulerSvc.h.
| IOBoundAlgSchedulerSvc::IOBoundAlgSchedulerSvc | ( | const std::string & | name, |
| ISvcLocator * | svc | ||
| ) |
Constructor.
Definition at line 24 of file IOBoundAlgSchedulerSvc.cpp.
|
override |
|
private |
Activate scheduler.
Activate the scheduler.
From this moment on the queue of actions is checked. The checking will stop when the m_isActive flag is false and the queue is not empty. This will guarantee that all actions are executed and a stall is not created.
Definition at line 80 of file IOBoundAlgSchedulerSvc.cpp.
|
private |
Deactivate scheduler.
Deactivates the scheduler.
Two actions are pushed into the queue: 1) Drain the scheduler until all events are finished. 2) Flip the status flag m_isActive to false This second action is the last one to be executed by the scheduler.
Definition at line 106 of file IOBoundAlgSchedulerSvc.cpp.
|
override |
Finalise.
Here the scheduler is deactivated and the thread joined.
Definition at line 57 of file IOBoundAlgSchedulerSvc.cpp.
|
override |
Initialise.
Here, among some "bureaucracy" operations, the scheduler is activated, executing the activate() function in a new thread.
Definition at line 37 of file IOBoundAlgSchedulerSvc.cpp.
|
override |
Add an algorithm to local queue to run on accelerator.
Definition at line 123 of file IOBoundAlgSchedulerSvc.cpp.
|
private |
This is done since the copy of the lambda storage is too expensive.
Queue where closures are stored and picked for execution
Definition at line 64 of file IOBoundAlgSchedulerSvc.h.
|
private |
Flag to track if the scheduler is active or not.
Definition at line 53 of file IOBoundAlgSchedulerSvc.h.
|
private |
The thread in which the activate function runs.
Definition at line 56 of file IOBoundAlgSchedulerSvc.h.