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 ( )

◆ ~OperationRegistry()

bdm::OperationRegistry::~OperationRegistry ( )

Definition at line 19 of file

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

[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 true when the operation is successfully added to registry

Definition at line 39 of file

◆ GetInstance()

OperationRegistry * bdm::OperationRegistry::GetInstance ( )

Singleton class - returns the static instance.

Definition at line 25 of file

◆ GetOperation()

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

Gets the operation

[in]op_nameThe operation's name
The operation pointer

Definition at line 30 of file

Member Data Documentation

◆ operations_

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

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: