ExecutionState Class Reference

HiCR: HiCR::backend::pthreads::ExecutionState Class Reference
HiCR
HiCR::backend::pthreads::ExecutionState Class Referencefinal

#include <executionState.hpp>

Inheritance diagram for HiCR::backend::pthreads::ExecutionState:
HiCR::ExecutionState

Public Member Functions

__INLINE__ ExecutionState (const std::shared_ptr< HiCR::ExecutionUnit > &executionUnit, void *const argument=nullptr)
 
- Public Member Functions inherited from HiCR::ExecutionState
__INLINE__ void resume ()
 
__INLINE__ void suspend ()
 
__INLINE__ bool checkFinalization ()
 
__INLINE__ state_t getState ()
 
 ExecutionState ()=delete
 
virtual ~ExecutionState ()=default
 

Protected Member Functions

__INLINE__ void resumeImpl () override
 
__INLINE__ void suspendImpl () override
 
__INLINE__ bool checkFinalizationImpl () override
 
- Protected Member Functions inherited from HiCR::ExecutionState
 ExecutionState (const std::shared_ptr< HiCR::ExecutionUnit > &executionUnit)
 

Additional Inherited Members

- Public Types inherited from HiCR::ExecutionState
enum  state_t {
  uninitialized , initialized , running , suspended ,
  finished
}
 

Detailed Description

This class represents the execution state of a resumable function for the pthreads backends.

Constructor & Destructor Documentation

◆ ExecutionState()

__INLINE__ HiCR::backend::pthreads::ExecutionState::ExecutionState ( const std::shared_ptr< HiCR::ExecutionUnit > &  executionUnit,
void *const  argument = nullptr 
)
inline

Creates a new execution state to be executed in a pthread

Parameters
[in]executionUnitThe replicable stateless execution unit to instantiate
[in]argumentArgument (closure) to pass to the function to be ran

Member Function Documentation

◆ checkFinalizationImpl()

__INLINE__ bool HiCR::backend::pthreads::ExecutionState::checkFinalizationImpl ( )
inlineoverrideprotectedvirtual

Backend-specific implementation of the checkFinalization function

Returns
True, if the execution has finalized; False, otherwise.

Implements HiCR::ExecutionState.

◆ resumeImpl()

__INLINE__ void HiCR::backend::pthreads::ExecutionState::resumeImpl ( )
inlineoverrideprotectedvirtual

Backend-specific implementation of the resume function

Implements HiCR::ExecutionState.

◆ suspendImpl()

__INLINE__ void HiCR::backend::pthreads::ExecutionState::suspendImpl ( )
inlineoverrideprotectedvirtual

Backend-specific implementation of the suspend function

Implements HiCR::ExecutionState.


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