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

A class that represents a SYCL context. More...

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

+ Collaboration diagram for sham::DeviceContext:

Public Member Functions

void print_info ()
 Print information about this context.
 
 DeviceContext (std::shared_ptr< Device > device)
 Construct a new Device Context object.
 
bool use_direct_comm ()
 Check if the context should use direct communication.
 

Public Attributes

std::shared_ptr< Devicedevice
 
sycl::context ctx
 

Detailed Description

A class that represents a SYCL context.

This class is responsible for creating and holding the SYCL context object, as well as providing methods for accessing it.

Definition at line 28 of file DeviceContext.hpp.

Constructor & Destructor Documentation

◆ DeviceContext()

sham::DeviceContext::DeviceContext ( std::shared_ptr< Device device)
explicit

Construct a new Device Context object.

Parameters
deviceThe device(s) to use for this context

Definition at line 41 of file DeviceContext.cpp.

Member Function Documentation

◆ print_info()

void sham::DeviceContext::print_info ( )

Print information about this context.

Definition at line 44 of file DeviceContext.cpp.

◆ use_direct_comm()

bool sham::DeviceContext::use_direct_comm ( )

Check if the context 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 57 of file DeviceContext.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ ctx

sycl::context sham::DeviceContext::ctx

The SYCL context object

Definition at line 38 of file DeviceContext.hpp.

◆ device

std::shared_ptr<Device> sham::DeviceContext::device

The device(s) associated with this context

Definition at line 33 of file DeviceContext.hpp.


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