diff options
author | Andrzej Janik <[email protected]> | 2024-12-05 04:33:43 +0100 |
---|---|---|
committer | Andrzej Janik <[email protected]> | 2024-12-05 04:33:43 +0100 |
commit | 50cfd16a0626116fa5b7380e422aa34d2a68e70b (patch) | |
tree | b85d4174026eff65fd2271720371d8a267bfdd25 /zluda/src/impl/memory.rs | |
parent | 320cf9396c7c14f69dbff1e561012487d9e17c5b (diff) | |
download | ZLUDA-50cfd16a0626116fa5b7380e422aa34d2a68e70b.tar.gz ZLUDA-50cfd16a0626116fa5b7380e422aa34d2a68e70b.zip |
Minor fixes requried by geekbench
Diffstat (limited to 'zluda/src/impl/memory.rs')
-rw-r--r-- | zluda/src/impl/memory.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/zluda/src/impl/memory.rs b/zluda/src/impl/memory.rs index 3843776..33d5a4e 100644 --- a/zluda/src/impl/memory.rs +++ b/zluda/src/impl/memory.rs @@ -1,4 +1,5 @@ use hip_runtime_sys::*; +use std::mem; pub(crate) fn alloc_v2(dptr: *mut hipDeviceptr_t, bytesize: usize) -> hipError_t { unsafe { hipMalloc(dptr.cast(), bytesize) }?; @@ -33,3 +34,7 @@ pub(crate) fn get_address_range_v2( ) -> hipError_t { unsafe { hipMemGetAddressRange(pbase, psize, dptr) } } + +pub(crate) fn set_d32_v2(dst: hipDeviceptr_t, ui: ::core::ffi::c_uint, n: usize) -> hipError_t { + unsafe { hipMemsetD32(dst, mem::transmute(ui), n) } +} |