ExecutionUnit Class Reference

HiCR: HiCR::backend::pthreads::ExecutionUnit Class Reference
HiCR
HiCR::backend::pthreads::ExecutionUnit Class Reference

#include <executionUnit.hpp>

Inheritance diagram for HiCR::backend::pthreads::ExecutionUnit:
HiCR::ExecutionUnit

Public Types

using pthreadFc_t = std::function< void(void *)>
 

Public Member Functions

 ExecutionUnit (pthreadFc_t fc)
 
 ~ExecutionUnit () override=default
 
__INLINE__ std::string getType () const override
 
__INLINE__ pthreadFc_tgetFunction ()
 

Detailed Description

This class represents a replicable C++ executable function for the CPU-based backends

Member Typedef Documentation

◆ pthreadFc_t

using HiCR::backend::pthreads::ExecutionUnit::pthreadFc_t = std::function<void(void *)>

Accepting a replicable C++ function type with closure parameter

Constructor & Destructor Documentation

◆ ExecutionUnit()

HiCR::backend::pthreads::ExecutionUnit::ExecutionUnit ( pthreadFc_t  fc)
inline

Constructor for the execution unit class of the Pthreads backend

Parameters
fcA replicable C++ function to run in this execution unit

◆ ~ExecutionUnit()

HiCR::backend::pthreads::ExecutionUnit::~ExecutionUnit ( )
overridevirtualdefault

Default destructor

Reimplemented from HiCR::ExecutionUnit.

Member Function Documentation

◆ getFunction()

__INLINE__ pthreadFc_t & HiCR::backend::pthreads::ExecutionUnit::getFunction ( )
inline

Returns the internal function stored inside this execution unit

Returns
The internal function stored inside this execution unit

◆ getType()

__INLINE__ std::string HiCR::backend::pthreads::ExecutionUnit::getType ( ) const
inlineoverridevirtual

Indicates what type of execution unit is contained in this instance

Returns
A string containing a human-readable description of the execution unit type

Implements HiCR::ExecutionUnit.


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