MCPcopy Create free account
hub / github.com/Rust-GPU/rust-cuda / quick_init

Function quick_init

crates/cust/src/lib.rs:119–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

117/// context.
118#[must_use = "The CUDA Context must be kept alive or errors will be issued for any CUDA function that is run"]
119pub fn quick_init() -> CudaResult<Context> {
120 init(CudaFlags::empty())?;
121 let device = Device::get_device(0)?;
122 let ctx = Context::new(device)?;
123 ctx.set_flags(ContextFlags::SCHED_AUTO)?;
124 Ok(ctx)
125}
126
127/// Struct representing the CUDA API version number.
128#[derive(Debug, Hash, Eq, PartialEq, Ord, PartialOrd, Copy, Clone)]

Callers 15

mainFunction · 0.85
newMethod · 0.85
mainFunction · 0.85
test_new_with_flagsFunction · 0.85
test_allocate_and_freeFunction · 0.85
test_into_from_unifiedFunction · 0.85
test_equalityFunction · 0.85
test_orderingFunction · 0.85

Calls 3

newFunction · 0.85
initFunction · 0.70
set_flagsMethod · 0.45

Tested by 15

test_new_with_flagsFunction · 0.68
test_allocate_and_freeFunction · 0.68
test_into_from_unifiedFunction · 0.68
test_equalityFunction · 0.68
test_orderingFunction · 0.68
test_newFunction · 0.68
test_from_sliceFunction · 0.68
from_raw_partsFunction · 0.68