BioDynaMo
v1.05.120-25dc9790
|
Go to the documentation of this file.
27 return &operation_registry;
33 std::string msg =
"Operation not found in registry: " + op_name;
34 Log::Fatal(
"OperationRegistry::GetOperation", msg);
36 return search->second;
47 std::make_pair(op_name,
new Operation(op_name, frequency)));
49 op->second->AddOperationImpl(target, impl);
50 }
else if (op->second->implementations_.size() >=
51 static_cast<size_t>(target + 1)) {
53 if (op->second->implementations_[target]) {
54 Log::Fatal(
"OperationRegistry::AddOperationImpl",
"Operation '", op_name,
56 "' already exists in the registry!");
60 op->second->AddOperationImpl(target, impl);
Operation * GetOperation(const std::string &op_name)
std::string OpComputeTargetString(OpComputeTarget t)
bool AddOperationImpl(const std::string &op_name, OpComputeTarget target, OperationImpl *impl, uint32_t frequency=1)
static void Fatal(const std::string &location, const Args &... parts)
Prints fatal error message.
static OperationRegistry * GetInstance()
Singleton class - returns the static instance.
std::unordered_map< std::string, Operation * > operations_
The map containing the operations; accessible by their name.