File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 22
33Notable changes to this project will be documented in this file.
44
5+ ## Unreleased
6+
7+ - Add ` memory::memcpy_dtoh ` to allow copying from device to host.
8+
59## 0.3.2 - 2/16/22
610
711- Fixed ` ModuleJitOptions ` not working (due to cursed reasons).
Original file line number Diff line number Diff line change @@ -214,6 +214,17 @@ pub unsafe fn memcpy_htod(
214214 Ok ( ( ) )
215215}
216216
217+ /// Simple wrapper over cuMemcpyDtoH_v2
218+ #[ allow( clippy:: missing_safety_doc) ]
219+ pub unsafe fn memcpy_dtoh (
220+ d_ptr : * mut c_void ,
221+ src_ptr : cust_raw:: CUdeviceptr ,
222+ size : usize ,
223+ ) -> CudaResult < ( ) > {
224+ crate :: sys:: cuMemcpyDtoH_v2 ( d_ptr, src_ptr, size) . to_result ( ) ?;
225+ Ok ( ( ) )
226+ }
227+
217228/// Get the current free and total memory.
218229///
219230/// Returns in `.1` the total amount of memory available to the the current context.
You can’t perform that action at this time.
0 commit comments