Base class to provide common infrastructure for handling multiprocess state transitions for GPU.
More...
#include <DeviceStateHandler.h>
Base class to provide common infrastructure for handling multiprocess state transitions for GPU.
Based on CaloRecGPU/CaloGPUCUDAInitialization.h
Definition at line 27 of file DeviceStateHandler.h.
◆ ~DeviceStateHandler()
| virtual AthHIPExamples::DeviceStateHandler::~DeviceStateHandler |
( |
| ) |
|
|
virtualdefault |
◆ handle()
| void AthHIPExamples::DeviceStateHandler::handle |
( |
const Incident & | incident | ) |
|
|
inlineoverride |
Definition at line 86 of file DeviceStateHandler.h.
87 {
88 const bool is_multiprocess = (Gaudi::Concurrency::ConcurrencyFlags::numProcs() > 0);
90 {
93 {
94 throw GaudiException("Failed to initialize the device setup!",
95 "DeviceStateHandler::handle",
96 StatusCode::FAILURE);
97 }
98 }
99 }
virtual StatusCode initialize_worker()
Initialization per process.
static const std::string & type()
Incident type.
◆ initialize()
| virtual StatusCode AthHIPExamples::DeviceStateHandler::initialize |
( |
| ) |
|
|
inlineprotectedvirtual |
Definition at line 49 of file DeviceStateHandler.h.
50 {
52
53 const bool is_multiprocess = (Gaudi::Concurrency::ConcurrencyFlags::numProcs() > 0);
54
55 if (is_multiprocess)
56 {
57 ServiceHandle<IIncidentSvc> incidentSvc("IncidentSvc","DeviceStateHandler");
59 }
60 else
61 {
63 }
64
65 return StatusCode::SUCCESS;
66 }
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual StatusCode initialize_global()
Glocal initialization.
◆ initialize_global()
| virtual StatusCode AthHIPExamples::DeviceStateHandler::initialize_global |
( |
| ) |
|
|
inlineprotectedvirtual |
Glocal initialization.
Definition at line 32 of file DeviceStateHandler.h.
33 {
34 return StatusCode::SUCCESS;
35 }
◆ initialize_worker()
| virtual StatusCode AthHIPExamples::DeviceStateHandler::initialize_worker |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ stop()
| virtual StatusCode AthHIPExamples::DeviceStateHandler::stop |
( |
| ) |
|
|
inlineprotectedvirtual |
Definition at line 68 of file DeviceStateHandler.h.
68 {
69 const bool is_multiprocess = (Gaudi::Concurrency::ConcurrencyFlags::numProcs() > 0);
70
71 if (!is_multiprocess) {
73 } else {
76 }
77 }
78
79 return StatusCode::SUCCESS;
80 }
virtual StatusCode stop_worker()
clean up
◆ stop_worker()
| virtual StatusCode AthHIPExamples::DeviceStateHandler::stop_worker |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ m_is_child
| bool AthHIPExamples::DeviceStateHandler::m_is_child = false |
|
protected |
The documentation for this class was generated from the following file: