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

Function test_cuda_malloc

crates/cust/src/memory/malloc.rs:300–307  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

298
299 #[test]
300 fn test_cuda_malloc() {
301 let _context = crate::quick_init().unwrap();
302 unsafe {
303 let device_mem = cuda_malloc::<u64>(1).unwrap();
304 assert!(!device_mem.is_null());
305 cuda_free(device_mem).unwrap();
306 }
307 }
308
309 #[test]
310 fn test_cuda_malloc_zero_bytes() {

Callers

nothing calls this directly

Calls 2

quick_initFunction · 0.85
cuda_freeFunction · 0.85

Tested by

no test coverage detected