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

Method is_null

crates/cust/src/memory/pointer.rs:78–80  ·  view source on GitHub ↗

Returns true if the pointer is null. # Examples ``` # let _context = cust::quick_init().unwrap(); use cust::memory::*; use std::ptr; unsafe { let null : *mut u64 = ptr::null_mut(); assert!(DevicePointer::wrap(null).is_null()); } ```

(self)

Source from the content-addressed store, hash-verified

76 /// }
77 /// ```
78 pub fn is_null(self) -> bool {
79 self.ptr == 0
80 }
81
82 /// Returns a null device pointer.
83 ///

Callers 15

dropMethod · 0.80
dropMethod · 0.80
dropMethod · 0.80
dropMethod · 0.80
newMethod · 0.80
dropMethod · 0.80
cuda_freeFunction · 0.80
cuda_free_unifiedFunction · 0.80
cuda_free_lockedFunction · 0.80
drop_asyncMethod · 0.80
dropMethod · 0.80
set_8Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected