![]() |
Shamrock 2025.10.0
Astrophysical Code
|
A class that represents a SYCL context. More...
#include <shambackends/include/shambackends/DeviceContext.hpp>
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< Device > | device |
| sycl::context | ctx |
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.
|
explicit |
Construct a new Device Context object.
| device | The device(s) to use for this context |
Definition at line 41 of file DeviceContext.cpp.
| void sham::DeviceContext::print_info | ( | ) |
Print information about this context.
Definition at line 44 of file DeviceContext.cpp.
| 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.
Definition at line 57 of file DeviceContext.cpp.
| sycl::context sham::DeviceContext::ctx |
The SYCL context object
Definition at line 38 of file DeviceContext.hpp.
| std::shared_ptr<Device> sham::DeviceContext::device |
The device(s) associated with this context
Definition at line 33 of file DeviceContext.hpp.