BioDynaMo  v1.05.120-25dc9790
Classes | Namespaces | Macros | Functions
operation_registry.h File Reference
#include "core/operation/operation.h"
#include <unordered_map>
Include dependency graph for operation_registry.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  bdm::OperationRegistry
 

Namespaces

 bdm
 

Macros

#define BDM_REGISTER_OP(op, name, target)
 
#define BDM_REGISTER_OP_WITH_FREQ(op, name, target, frequency)
 
#define BDM_REGISTER_TEMPLATE_OP(op, T, name, target)
 
#define BDM_OP_HEADER(class_name)
 

Functions

Operation * bdm::NewOperation (const std::string &name)
 A convenient function to get a new operation from the registry by its name. More...
 

Macro Definition Documentation

◆ BDM_OP_HEADER

#define BDM_OP_HEADER (   class_name)
Value:
private: \
static bool registered_; \
\
public: \
class_name *Clone() override { return new class_name(*this); }

A convenient macro to hide some of the boilerplate code from the user in implementing new operations.

Definition at line 91 of file operation_registry.h.

◆ BDM_REGISTER_OP

#define BDM_REGISTER_OP (   op,
  name,
  target 
)
Value:
bool op::registered_ = OperationRegistry::GetInstance()->AddOperationImpl( \
name, OpComputeTarget::target, new op());

A convenient macro to register a new operation implemented. To be used as: BDM_REGISTER_OP(MyOp, "my operation", kCpu) MyOp is required to have member: static bool registered_

Definition at line 64 of file operation_registry.h.

◆ BDM_REGISTER_OP_WITH_FREQ

#define BDM_REGISTER_OP_WITH_FREQ (   op,
  name,
  target,
  frequency 
)
Value:
bool op::registered_ = OperationRegistry::GetInstance()->AddOperationImpl( \
name, OpComputeTarget::target, new op(), frequency);
See also
BDM_REGISTER_OP Adds parameter to specigy default execution frequency (
Operation::frequency_)

Definition at line 71 of file operation_registry.h.

◆ BDM_REGISTER_TEMPLATE_OP

#define BDM_REGISTER_TEMPLATE_OP (   op,
  T,
  name,
  target 
)
Value:
template <> \
bool op<T>::registered_ = \
OperationRegistry::GetInstance()->AddOperationImpl( \
name, OpComputeTarget::target, new op<T>());

A convenient macro to register a new operation implemented. To be used as: BDM_REGISTER_OP(MyOp, "my operation", kCpu) MyOp is required to have member: static bool registered_

Definition at line 78 of file operation_registry.h.