Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
sham::DeviceScheduler Class Reference

Class to manage the scheduling of kernels on a device. More...

#include <shambackends/include/shambackends/DeviceScheduler.hpp>

+ Collaboration diagram for sham::DeviceScheduler:

Public Member Functions

 DeviceScheduler (std::shared_ptr< DeviceContext > ctx)
 Constructor.
 
DeviceQueueget_queue (u32 id=0)
 Get a reference to a DeviceQueue.
 
void print_info ()
 Print information about the DeviceScheduler.
 
bool use_direct_comm ()
 Check if the context corresponding to the device scheduler should use direct communication.
 

Public Attributes

std::shared_ptr< DeviceContextctx
 Reference to the device context associated with this DeviceScheduler.
 
std::vector< std::unique_ptr< DeviceQueue > > queues
 Vector of unique pointers to the DeviceQueues associated with this DeviceScheduler.
 

Detailed Description

Class to manage the scheduling of kernels on a device.

The DeviceScheduler is responsible for scheduling kernels on the device. It contains a set of DeviceQueues.

Definition at line 28 of file DeviceScheduler.hpp.

Constructor & Destructor Documentation

◆ DeviceScheduler()

sham::DeviceScheduler::DeviceScheduler ( std::shared_ptr< DeviceContext ctx)
explicit

Constructor.

Parameters
ctxReference to the device context associated with this DeviceScheduler

Definition at line 52 of file DeviceScheduler.cpp.

Member Function Documentation

◆ get_queue()

DeviceQueue & sham::DeviceScheduler::get_queue ( u32  id = 0)

Get a reference to a DeviceQueue.

Parameters
idId of the DeviceQueue to retrieve
Returns
Reference to the requested DeviceQueue

Definition at line 57 of file DeviceScheduler.cpp.

◆ print_info()

void sham::DeviceScheduler::print_info ( )

Print information about the DeviceScheduler.

Definition at line 59 of file DeviceScheduler.cpp.

◆ use_direct_comm()

bool sham::DeviceScheduler::use_direct_comm ( )

Check if the context corresponding to the device scheduler should use direct communication.

This method returns true if the context should use direct communication, false otherwise.

Returns
true if direct communication should be used

Definition at line 71 of file DeviceScheduler.cpp.

Member Data Documentation

◆ ctx

std::shared_ptr<DeviceContext> sham::DeviceScheduler::ctx

Reference to the device context associated with this DeviceScheduler.

Definition at line 34 of file DeviceScheduler.hpp.

◆ queues

std::vector<std::unique_ptr<DeviceQueue> > sham::DeviceScheduler::queues

Vector of unique pointers to the DeviceQueues associated with this DeviceScheduler.

Definition at line 40 of file DeviceScheduler.hpp.


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