Fix build

This commit is contained in:
Andrzej Janik
2025-07-31 00:18:10 +00:00
parent 4197fa003c
commit 6cacea5599
2 changed files with 1 additions and 3 deletions

View File

@ -22,7 +22,6 @@ lz4-sys = "1.9"
tempfile = "3"
paste = "1.0"
rustc-hash = "1.1"
dtor = "0.0.6"
zluda_common = { path = "../zluda_common" }
[target.'cfg(windows)'.dependencies]

View File

@ -1,5 +1,4 @@
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) }?;
@ -36,7 +35,7 @@ pub(crate) fn get_address_range_v2(
}
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) }
unsafe { hipMemsetD32(dst, ui as std::ffi::c_int, n) }
}
pub(crate) fn set_d8_v2(dst: hipDeviceptr_t, value: ::core::ffi::c_uchar, n: usize) -> hipError_t {