[−][src]Struct rustacuda::context::ContextStack
Type used to represent the thread-local context stack.
Implementations
impl ContextStack
[src]
pub fn pop() -> CudaResult<UnownedContext>
[src]
Pop the current context off the stack and return the handle. That context may then be made current again (perhaps on a different CPU thread) by calling push.
Example
let unowned = ContextStack::pop()?;
pub fn push<C: ContextHandle>(ctx: &C) -> CudaResult<()>
[src]
Push the given context to the top of the stack
Example
let unowned = ContextStack::pop()?; ContextStack::push(&unowned)?;
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ContextStack
impl Send for ContextStack
impl Sync for ContextStack
impl Unpin for ContextStack
impl UnwindSafe for ContextStack
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,