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

Function memcpy_htod

crates/cust/src/memory/mod.rs:208–215  ·  view source on GitHub ↗
(
    d_ptr: cust_raw::CUdeviceptr,
    src_ptr: *const c_void,
    size: usize,
)

Source from the content-addressed store, hash-verified

206/// Simple wrapper over cuMemcpyHtoD_v2
207#[allow(clippy::missing_safety_doc)]
208pub unsafe fn memcpy_htod(
209 d_ptr: cust_raw::CUdeviceptr,
210 src_ptr: *const c_void,
211 size: usize,
212) -> CudaResult<()> {
213 crate::sys::cuMemcpyHtoD_v2(d_ptr, src_ptr, size).to_result()?;
214 Ok(())
215}
216
217/// Get the current free and total memory.
218///

Callers 1

newMethod · 0.85

Calls 1

to_resultMethod · 0.45

Tested by

no test coverage detected