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

Method set_8_async

crates/cust/src/memory/device/device_slice.rs:244–256  ·  view source on GitHub ↗
(&mut self, value: u8, stream: &Stream)

Source from the content-addressed store, hash-verified

242 /// Therefore you should not read/write from/to the memory range until the operation is complete.
243 #[cfg_attr(docsrs, doc(cfg(feature = "bytemuck")))]
244 pub unsafe fn set_8_async(&mut self, value: u8, stream: &Stream) -> CudaResult<()> {
245 if self.ptr.is_null() {
246 return Ok(());
247 }
248
249 cuda::cuMemsetD8Async(
250 self.ptr.as_raw(),
251 value,
252 size_of::<T>() * self.len,
253 stream.as_inner(),
254 )
255 .to_result()
256 }
257
258 /// Sets the memory range of this buffer to contiguous `16-bit` values of `value`.
259 ///

Callers 1

set_zero_asyncMethod · 0.80

Calls 4

is_nullMethod · 0.80
to_resultMethod · 0.45
as_rawMethod · 0.45
as_innerMethod · 0.45

Tested by

no test coverage detected