Graphitti
A toolkit/software architecture to ease creating high-performance neural network simulators
Loading...
Searching...
No Matches
OperationManager Class Reference

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.
 
OperationManageroperator= (const OperationManager &operationManager)=delete
 
 OperationManager (OperationManager &&operationManager)=delete
 
OperationManageroperator= (OperationManager &&operationManager)=delete
 

Static Public Member Functions

static OperationManagergetInstance ()
 Get Instance method that returns a reference to this object.
 

Detailed Description

Definition at line 25 of file OperationManager.h.

Member Function Documentation

◆ executeOperation() [1/2]

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.

◆ executeOperation() [2/2]

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.

◆ getInstance()

OperationManager & OperationManager::getInstance ( )
static

Get Instance method that returns a reference to this object.

Definition at line 22 of file OperationManager.cpp.

◆ operationToString()

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.

◆ registerOperation() [1/2]

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.

◆ registerOperation() [2/2]

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

Parameters
operationThe Operation type that will use the input function.
functionThe function invoked for the operation. Takes in two arguments of type uint64_t

Definition at line 47 of file OperationManager.cpp.


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