The Gaudi Framework
master (37c0b60a)
|
#include </builds/gaudi/Gaudi/GaudiHive/src/FiberManager.h>
Public Member Functions | |
FiberManager (int n_threads) | |
FiberManager constructor. More... | |
~FiberManager () | |
template<typename F > | |
void | schedule (F &&func) |
Schedule work to run on the asynchronous pool. More... | |
Private Types | |
using | SchedAlgo = boost::fibers::algo::shared_work |
Private Attributes | |
boost::fibers::condition_variable | m_shuttingDown_cv {} |
boost::fibers::mutex | m_shuttingDown_mtx {} |
std::vector< std::thread > | m_threads {} |
std::vector< SchedAlgo * > | m_schedAlgoList {} |
The FiberManager manages a pool of threads used to run boost::fiber fibers.
These fibers can be suspended while waiting for GPU operations (with CUDA and HIP support built-in), remote I/O operations, and the like, providing a base for asynchronous algorithm support.
Definition at line 34 of file FiberManager.h.
|
private |
Definition at line 60 of file FiberManager.h.
FiberManager::FiberManager | ( | int | n_threads | ) |
FiberManager constructor.
n_threads | Number of threads for CPU portion of asynchronous algorithms. These are in addition to the TBB worker threads used for CPU algorithms. |
Definition at line 14 of file FiberManager.cpp.
FiberManager::~FiberManager | ( | ) |
Definition at line 41 of file FiberManager.cpp.
|
inline |
Schedule work to run on the asynchronous pool.
AsynchronousAlgorithms should use a relatively small amount of CPU time, and should use boost::fiber functionality to yield while waiting for offloaded work to complete.
func | The AlgTask, when used in AvalancheSchedulerSvc |
Definition at line 54 of file FiberManager.h.
|
private |
Definition at line 64 of file FiberManager.h.
|
private |
Definition at line 61 of file FiberManager.h.
|
private |
Definition at line 62 of file FiberManager.h.
|
private |
Definition at line 63 of file FiberManager.h.