aboutsummaryrefslogtreecommitdiffhomepage
path: root/zluda/src/impl/memory.rs
diff options
context:
space:
mode:
authorAndrzej Janik <[email protected]>2024-12-10 21:48:10 +0100
committerGitHub <[email protected]>2024-12-10 21:48:10 +0100
commit7ac67a89e9ac08d743242627cacefda518cefd68 (patch)
tree5fdb6c1519256268ef1b72a83728fb72b813c78c /zluda/src/impl/memory.rs
parent7a6df9dcbf59edef371e7f63c16c64916ddb0c0b (diff)
downloadZLUDA-7ac67a89e9ac08d743242627cacefda518cefd68.tar.gz
ZLUDA-7ac67a89e9ac08d743242627cacefda518cefd68.zip
Enable Geekbench 5 (#304)
Diffstat (limited to 'zluda/src/impl/memory.rs')
-rw-r--r--zluda/src/impl/memory.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/zluda/src/impl/memory.rs b/zluda/src/impl/memory.rs
index 3843776..18e58e7 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,11 @@ 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) }
+}
+
+pub(crate) fn set_d8_v2(dst: hipDeviceptr_t, value: ::core::ffi::c_uchar, n: usize) -> hipError_t {
+ unsafe { hipMemsetD8(dst, value, n) }
+}