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

Method is_empty

crates/cust/src/memory/device/device_slice.rs:62–64  ·  view source on GitHub ↗

Returns `true` if the slice has a length of 0. # Examples ``` # let _context = cust::quick_init().unwrap(); use cust::memory::*; let a : DeviceBuffer = unsafe { DeviceBuffer::uninitialized(0).unwrap() }; assert!(a.is_empty()); ```

(&self)

Source from the content-addressed store, hash-verified

60 /// assert!(a.is_empty());
61 /// ```
62 pub fn is_empty(&self) -> bool {
63 self.len == 0
64 }
65
66 /// Return a raw device-pointer to the slice's buffer.
67 ///

Callers 13

invoke_rustcFunction · 0.45
into_slice_rangeFunction · 0.45
include_cudaFunction · 0.45
uncached_llvm_typeFunction · 0.45
module_codegenFunction · 0.45
llvm_typeMethod · 0.45
set_var_nameMethod · 0.45
subroutine_type_metadataFunction · 0.45
type_metadataFunction · 0.45
basic_type_metadataFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected