pub fn new() -> Result<Self, CudnnError> {
        let mut raw = MaybeUninit::uninit();

        unsafe {
            sys::cudnnCreate(raw.as_mut_ptr()).into_result()?;
            let raw = raw.assume_init();

            Ok(Self { raw })
        }
    }
/// Creates a new cuDNN context, allocating the required memory on both host and device.
/// # Examples
///
/// ```
/// # use std::error::Error;
/// #
/// # fn main() -> Result<(), Box<dyn Error>> {
/// use cudnn::CudnnContext;
///
/// let ctx = CudnnContext::new()?;
/// # Ok(())
/// # }
/// ```
Creates a new cuDNN context, allocating the required memory on both host and device.
Creates a new cuDNN context allocating the required memory on both host and device .
pub fn new() -> Result<Self, CudnnError> {
        let mut raw = MaybeUninit::uninit();
        unsafe {
            sys::cudnnCreate(raw.as_mut_ptr()).into_result()?;
            let raw = raw.assume_init();
            Ok(Self { raw })
        }
    }
pub fn new ( ) -> Result < Self , CudnnError > { let mut raw = MaybeUninit :: uninit ( ) ; unsafe { sys :: cudnnCreate ( raw . as_mut_ptr ( ) ) . into_result ( ) ? ; let raw = raw . assume_init ( ) ; Ok ( Self { raw } ) } }
Creates a new cuDNN context, allocating the required memory on both host and device.
Creates a new cuDNN context allocating the required memory on both host and device .
examples
None
use std::error::error;
None
fn main() -> result<(), box<dyn error>> {
use cudnn::CudnnContext.

let ctx = CudnnContext::new()?.
use cudnn :: CudnnContext . let ctx = CudnnContext :: new () ? .
ok(())
None
}
None