nothing to do at the moment
checkSystemSignal - check the incomming streams for the param kernel for any system signals, if there is one then consume the signal and perform the appropriate action.
- Parameters
-
kernel | - raft::kernel |
data | - void*, use this if any further info is needed in future implementations of handlers |
- Returns
- raft::kstatus, proceed unless a stop signal is received
TODO, right now there is special behavior for term signal only, what should we do with others? Need to decide that.
init - call to pre-process all kernels, this function is called by the map object
kernelHasInputData - check each input port for available data, returns true if any of the input ports has available data.
- Parameters
-
- Returns
- bool - true if input data available.
only output ports, keep calling till exits
bool Schedule::kernelHasNoInputPorts |
( |
raft::kernel * |
kernel | ) |
|
|
staticprotected |
kernelHasNoInputPorts - pretty much exactly like the function name says, if the param kernel has no valid input ports (this function assumes that kernelHasInputData() has been called and returns false before this function is called) then it returns true. kernel - raft::kernel*
- Returns
- bool - true if no valid input ports avail
assume data check is already complete
void Schedule::kernelRun |
( |
raft::kernel *const |
kernel, |
|
|
volatile bool & |
finished |
|
) |
| |
|
staticprotected |
kernelRun - all the logic necessary to run a single kernel successfully. Any additional signal handling should be handled by this function as its the only one that will be universally called by the scheduler.
- Parameters
-
kernel | - raft::kernel *const object, non-null kernel |
finished | - volatile bool - function sets to true when done. |
raft::kstatus Schedule::quitHandler |
( |
FIFO & |
fifo, |
|
|
raft::kernel * |
kernel, |
|
|
const raft::signal |
signal, |
|
|
void * |
data |
|
) |
| |
|
staticprotected |
quiteHandler - performs the actions needed when a port sends a quite signal (normal termination), this is most likely due to the end of data.
- Parameters
-
fifo | - FIFO& that sent the signal |
kernel | - raft::kernel* |
signal | - raft::signal |
data | - void*, vain attempt to future proof |
NOTE: This should be the only action needed currently, however that may change in the futre with more features and systems added.
scheduleKernel - adds the kernel "kernel" to the schedule, ensures that it is run. Other than that there are no guarantees for its execution. It is purely virtual in its implementation.
- Parameters
-
- Returns
- bool - returns false if the kernel is already scheduled.
does nothing
Reimplemented in pool_schedule, and simple_schedule.
virtual void Schedule::start |
( |
| ) |
|
|
pure virtual |
start - called to start execution of all kernels. Implementation specific so it is purely virtual.
Implemented in pool_schedule, and simple_schedule.
The documentation for this class was generated from the following files: