pub struct Context { /* private fields */ }Expand description
Cuda Context.
Implementations§
Source§impl Context
impl Context
Sourcepub fn new(dev: CuDevice, flags: u32) -> Result<Context, Error>
pub fn new(dev: CuDevice, flags: u32) -> Result<Context, Error>
Create Context on device dev. It is recommended to use zeroed flags.
Sourcepub fn get_api_version(&self) -> Result<u32, Error>
pub fn get_api_version(&self) -> Result<u32, Error>
Get Cuda API version.
Sourcepub fn make_current(&self) -> Result<ContextHandler<'_>, Error>
pub fn make_current(&self) -> Result<ContextHandler<'_>, Error>
Make this context current.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Unpin 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