/home/runner/work/HiCR/HiCR/include/hicr/backends/nosv/executionState.hpp Source File
HiCR
|
executionState.hpp
Go to the documentation of this file.
98 __INLINE__ ExecutionState(const std::shared_ptr<HiCR::ExecutionUnit> &executionUnit, void *const argument = nullptr)
105 if (c == nullptr) HICR_THROW_LOGIC("The passed execution unit is not supported by this execution state type\n");
108 check(nosv_type_init(&_executionStateTaskType, run_callback, NULL, completed_callback, "executionUnitTaskType", NULL, NULL, NOSV_TYPE_INIT_NONE));
111 check(nosv_create(&_executionStateTask, _executionStateTaskType, sizeof(taskMetadata_t), NOSV_CREATE_NONE));
157 // Check if the self task is actually this execution state task (otherwise is illegal as only the self task is to suspend itself)
158 if (self_task != _executionStateTask) HICR_THROW_RUNTIME("Those should be the same task. nosv_self(): %p, _executionStateTask: %p", &self_task, &_executionStateTask);
229 if (!(metadata->parent_task)) HICR_THROW_RUNTIME("The parent task is not existing (i.e. NULL).");
232 // [HiCR] Runtime Exception: Task has to be either in suspended or in finished state but I got State: 2. IsFinished: 0
This file consists of the common nOS-V function used for all the backend implementations.
nOS-V execution unit class. Main job is to store the function call
Definition executionState.hpp:38
Definition executionState.hpp:47
void suspendImpl() override
Definition executionState.hpp:152
nosv_task_t _executionStateTask
Definition executionState.hpp:90
__INLINE__ ExecutionState(const std::shared_ptr< HiCR::ExecutionUnit > &executionUnit, void *const argument=nullptr)
Definition executionState.hpp:98
bool checkFinalizationImpl() override
Definition executionState.hpp:179
__INLINE__ void resumeImpl() override
Definition executionState.hpp:127
Provides a base definition for a HiCR Execution State class.
Provides a failure model and corresponding exception classes.
Definition executionState.hpp:54
nosv_task_t parent_task
Definition executionState.hpp:79
nosv_barrier_t mainLoop_barrier
Definition executionState.hpp:64
ExecutionState * executionState
Definition executionState.hpp:84
volatile bool mainLoop
Definition executionState.hpp:58
std::function< void(void *)> fc
Definition executionState.hpp:69
Generated by