()
| 399 | |
| 400 | #[test] |
| 401 | fn test_cuda_malloc_locked() { |
| 402 | let _context = crate::quick_init().unwrap(); |
| 403 | unsafe { |
| 404 | let locked = cuda_malloc_locked::<u64>(1).unwrap(); |
| 405 | assert!(!locked.is_null()); |
| 406 | |
| 407 | // Write to the allocated memory |
| 408 | *locked = 64; |
| 409 | |
| 410 | cuda_free_locked(locked).unwrap(); |
| 411 | } |
| 412 | } |
| 413 | |
| 414 | #[test] |
| 415 | fn test_cuda_malloc_locked_zero_bytes() { |
nothing calls this directly
no test coverage detected