|
BioDynaMo
v1.05.125-2619fe54
|
#include <operation_registry.h>
Public Member Functions | |
| Operation * | GetOperation (const std::string &op_name) |
| bool | AddOperationImpl (const std::string &op_name, OpComputeTarget target, OperationImpl *impl, uint32_t frequency=1) |
Static Public Member Functions | |
| static OperationRegistry * | GetInstance () |
| Singleton class - returns the static instance. More... | |
Private Member Functions | |
| OperationRegistry () | |
| ~OperationRegistry () | |
Private Attributes | |
| std::unordered_map< std::string, Operation * > | operations_ |
| The map containing the operations; accessible by their name. More... | |
A registry of operation implementations that can be scheduled for a simulation. Since an operation can have multiple implementation (e.g. for execution on CPU, CUDA, OpenCL), we need to register them separately.
Definition at line 27 of file operation_registry.h.
|
privatedefault |
|
private |
Definition at line 19 of file operation_registry.cc.
| bool bdm::OperationRegistry::AddOperationImpl | ( | const std::string & | op_name, |
| OpComputeTarget | target, | ||
| OperationImpl * | impl, | ||
| uint32_t | frequency = 1 |
||
| ) |
Adds an operation implementation to the registry
| [in] | op_name | The operation's name |
| [in] | target | The compute target |
| impl | The implementation for the compute target | |
| [in] | frequency | The frequency at which the operation is executed |
Definition at line 39 of file operation_registry.cc.
|
static |
Singleton class - returns the static instance.
Definition at line 25 of file operation_registry.cc.
| Operation * bdm::OperationRegistry::GetOperation | ( | const std::string & | op_name | ) |
Gets the operation
| [in] | op_name | The operation's name |
Definition at line 30 of file operation_registry.cc.
|
private |
The map containing the operations; accessible by their name.
Definition at line 55 of file operation_registry.h.
1.8.17