Skip to content

Class simtix::system::TaskDispatcher

ClassList > simtix > system > TaskDispatcher

Task dispatcher for managing workgroups and SMs. More...

  • #include <system.h>

Inherits the following classes: simtix::sim::Clocked

Classes

Type Name
struct CompletionInfo
class Impl

Public Types

Type Name
enum Status

Public Functions

Type Name
bool AttachSM (BaseSM * sm)
Attach a Streaming Multiprocessor (SM) to the dispatcher.
std::optional< CompletionInfo > GetCompletionInfo ()
Retrieve information about the completion of a kernel execution.
bool Launch (const opencl::Kernel & k)
Launch a kernel for execution.
void Reset ()
Perform a hardware reset of the task dispatcher.
TaskDispatcher (const std::string & name)
Constructor of TaskDispatcher .
Status status () const
Get the current status of the task dispatcher.
~TaskDispatcher ()

Public Functions inherited from simtix::sim::Clocked

See simtix::sim::Clocked

Type Name
Clocked (const std::string & name, TickPri pri=kDefaultPri)
Constructor for clocled.
const std::string & name () const
Get the name of the clocked object.
virtual ~Clocked ()

Protected Attributes inherited from simtix::sim::Clocked

See simtix::sim::Clocked

Type Name
std::string name_
TickPri pri_

Protected Static Attributes inherited from simtix::sim::Clocked

See simtix::sim::Clocked

Type Name
bool busy_ = true
std::map< TickPri, std::vector< Clocked * > > clocked_objs_map_
uint64_t cur_tick_ = 0

Protected Functions inherited from simtix::sim::Clocked

See simtix::sim::Clocked

Type Name
virtual bool HasPendingTasks () = 0
Checks if any registered clocked objects have pending tasks at the current tick.
virtual void Tick () = 0
Global tick function that advances the simulation by one cycle.

Protected Static Functions inherited from simtix::sim::Clocked

See simtix::sim::Clocked

Type Name
void Register (Clocked * c)
Register a clocked object to participate in tick-driven simulation.
void Unregister (Clocked * c)
Unregister a clocked object from tick-driven simulation.

Detailed Description

The TaskDispatcher class is responsible for managing the dispatch of workgroups to Streaming Multiprocessors (SMs). It supports attaching SMs, launching kernels, and retrieving completion information.

Public Types Documentation

enum Status

enum simtix::system::TaskDispatcher::Status {
    kIdle = 0,
    kRunning
};

Public Functions Documentation

function AttachSM

Attach a Streaming Multiprocessor (SM) to the dispatcher.

bool simtix::system::TaskDispatcher::AttachSM (
    BaseSM * sm
) 

Parameters:

  • sm Pointer to the SM.

Returns:

True if the SM is attached successfully, false otherwise.


function GetCompletionInfo

Retrieve information about the completion of a kernel execution.

std::optional< CompletionInfo > simtix::system::TaskDispatcher::GetCompletionInfo () 

Returns:

Optional completion information.


function Launch

Launch a kernel for execution.

bool simtix::system::TaskDispatcher::Launch (
    const opencl::Kernel & k
) 

Parameters:

  • k Kernel to be launched.

Returns:

True if the kernel is launched successfully, false otherwise.


function Reset

Perform a hardware reset of the task dispatcher.

void simtix::system::TaskDispatcher::Reset () 


function TaskDispatcher

Constructor of TaskDispatcher .

explicit simtix::system::TaskDispatcher::TaskDispatcher (
    const std::string & name
) 

Parameters:

  • name Name of the task dispatcher. Supports only homogeneous SMs

function status

Get the current status of the task dispatcher.

Status simtix::system::TaskDispatcher::status () const

Returns:

Status of the task dispatcher.


function ~TaskDispatcher

simtix::system::TaskDispatcher::~TaskDispatcher () 


The documentation for this class was generated from the following file projects/simtix/include/simtix/system.h