BioDynaMo  v1.03.58-27764645
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
bdm::OperationRegistry Class Reference

#include <operation_registry.h>

Public Member Functions

OperationGetOperation (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 OperationRegistryGetInstance ()
 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ OperationRegistry()

bdm::OperationRegistry::OperationRegistry ( )
privatedefault

◆ ~OperationRegistry()

bdm::OperationRegistry::~OperationRegistry ( )
private

Definition at line 19 of file operation_registry.cc.

Member Function Documentation

◆ AddOperationImpl()

bool bdm::OperationRegistry::AddOperationImpl ( const std::string &  op_name,
OpComputeTarget  target,
OperationImpl impl,
uint32_t  frequency = 1 
)

Adds an operation implementation to the registry

Parameters
[in]op_nameThe operation's name
[in]targetThe compute target
implThe implementation for the compute target
[in]frequencyThe frequency at which the operation is executed
Returns
Returns true when the operation is successfully added to registry

Definition at line 39 of file operation_registry.cc.

◆ GetInstance()

OperationRegistry * bdm::OperationRegistry::GetInstance ( )
static

Singleton class - returns the static instance.

Definition at line 25 of file operation_registry.cc.

◆ GetOperation()

Operation * bdm::OperationRegistry::GetOperation ( const std::string &  op_name)

Gets the operation

Parameters
[in]op_nameThe operation's name
Returns
The operation pointer

Definition at line 30 of file operation_registry.cc.

Member Data Documentation

◆ operations_

std::unordered_map<std::string, Operation *> bdm::OperationRegistry::operations_
private

The map containing the operations; accessible by their name.

Definition at line 55 of file operation_registry.h.


The documentation for this class was generated from the following files: