pub fn create_context(&self) -> Context {
        let ptr = unsafe {
            ffi_new!(
                cuCtxCreate_v2,
                CUctx_flags_enum::CU_CTX_SCHED_AUTO as u32,
                self.device
            )
        }
        .expect("Failed to create a new context");
        if ptr.is_null() {
            panic!("Cannot crate a new context");
        }
        let ptr_new = ctx_pop().unwrap();
        assert_eq!(ptr, ptr_new);
        Arc::new(ContextOwned { ptr })
    }
/// Create a new CUDA context on this device.
///
/// ```
/// # use accel::*;
/// let device = Device::nth(0).unwrap();
/// let ctx = device.create_context();
/// ```
Create a new CUDA context on this device.
Create a new CUDA context on this device .
pub fn create_context(&self) -> Context {
        let ptr = unsafe {
            ffi_new!(
                cuCtxCreate_v2,
                CUctx_flags_enum::CU_CTX_SCHED_AUTO as u32,
                self.device
            )
        }
        .expect("Failed to create a new context");
        if ptr.is_null() {
            panic!("Cannot crate a new context");
        }
        let ptr_new = ctx_pop().unwrap();
        assert_eq!(ptr, ptr_new);
        Arc::new(ContextOwned { ptr })
    }
pub fn create_context ( & self ) -> Context { let ptr = unsafe { ffi_new ! ( cuCtxCreate_v2 CUctx_flags_enum CU_CTX_SCHED_AUTO as u32 self device ) } . expect ( " " ) ; if ptr . is_null ( ) { panic ! ( " " ) ; } let ptr_new = ctx_pop ( ) . unwrap ( ) ; assert_eq ! ( ptr ptr_new ) ; Arc :: new ( ContextOwned { ptr } ) }
Create a new CUDA context on this device.
Create a new CUDA context on this device .
&self
&self
use accel::*;
let device = Device::nth(0).unwrap();
let ctx = device.create_context();
```
let device = Device :: nth ( 0 ) . unwrap () ; let ctx = device . create_context () ; ` ` `