pub struct Context(/* private fields */);Expand description
A context represents the runtime data structures and state required by a SYCL backend API to interact with a group of devices associated with a platform.
Implementations§
Source§impl Context
impl Context
Sourcepub fn new(devices: &[&Device]) -> Result<Self>
pub fn new(devices: &[&Device]) -> Result<Self>
Constructs a context for devices from the same platform.
Returns an error if the device list is empty or context construction fails.
pub fn create_kernel_bundle_from_source( &self, source: &str, ) -> Result<SourceKernelBundle>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
impl UnwindSafe for Context
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more