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

Method sub

crates/cust/src/memory/pointer.rs:257–262  ·  view source on GitHub ↗
(self, count: usize)

Source from the content-addressed store, hash-verified

255 /// }
256 #[allow(clippy::should_implement_trait)]
257 pub unsafe fn sub(self, count: usize) -> Self
258 where
259 T: Sized,
260 {
261 self.offset((count as isize).wrapping_neg())
262 }
263
264 /// Calculates the offset from a pointer using wrapping arithmetic.
265 /// (convenience for `.wrapping_offset(count as isize)`)

Callers 1

Calls 1

offsetMethod · 0.80

Tested by

no test coverage detected