|
Graphitti
A toolkit/software architecture to ease creating high-performance neural network simulators
|
Public Member Functions | |
| ~OperationManager ()=default | |
| Destructor. | |
| void | registerOperation (const Operations &operation, const function< void()> &function) |
| void | registerOperation (const Operations &operation, const function< void(uint64_t, uint64_t)> &function) |
| Handles function signature: void (uint64_t,uint64_t) | |
| void | executeOperation (const Operations &operation) const |
| Takes in a operation type and invokes all registered functions that are classified as that operation type. | |
| void | executeOperation (const Operations &operation, uint64_t arg1, uint64_t arg2) const |
| Take in a operation type and invokes all registered functions that are classified as that operation type using the input arguments. | |
| string | operationToString (const Operations &operation) const |
| Takes in the operation enum and returns the enum as a string. Used for debugging purposes. | |
| OperationManager (const OperationManager &operationManager)=delete | |
| Delete copy and move methods to avoid copy instances of the singleton. | |
| OperationManager & | operator= (const OperationManager &operationManager)=delete |
| OperationManager (OperationManager &&operationManager)=delete | |
| OperationManager & | operator= (OperationManager &&operationManager)=delete |
Static Public Member Functions | |
| static OperationManager & | getInstance () |
| Get Instance method that returns a reference to this object. | |
Definition at line 25 of file OperationManager.h.
| void OperationManager::executeOperation | ( | const Operations & | operation | ) | const |
Takes in a operation type and invokes all registered functions that are classified as that operation type.
Definition at line 61 of file OperationManager.cpp.
| void OperationManager::executeOperation | ( | const Operations & | operation, |
| uint64_t | arg1, | ||
| uint64_t | arg2 ) const |
Take in a operation type and invokes all registered functions that are classified as that operation type using the input arguments.
TODO: Should we check anything about arg1 and arg2 before passing to the invoke???
Definition at line 73 of file OperationManager.cpp.
|
static |
Get Instance method that returns a reference to this object.
Definition at line 22 of file OperationManager.cpp.
| string OperationManager::operationToString | ( | const Operations & | operation | ) | const |
Takes in the operation enum and returns the enum as a string. Used for debugging purposes.
Definition at line 87 of file OperationManager.cpp.
| void OperationManager::registerOperation | ( | const Operations & | operation, |
| const function< void()> & | function ) |
Called by lower level classes constructors on creation to register their operations with their operation type. This method can be overloaded to handle different function signatures. Handles function signature: void ()
Definition at line 31 of file OperationManager.cpp.
| void OperationManager::registerOperation | ( | const Operations & | operation, |
| const function< void(uint64_t, uint64_t)> & | function ) |
Handles function signature: void (uint64_t,uint64_t)
Handles function signature: void (uint64_t,uint64_t).
| operation | The Operation type that will use the input function. |
| function | The function invoked for the operation. Takes in two arguments of type uint64_t |
Definition at line 47 of file OperationManager.cpp.