aboutsummaryrefslogtreecommitdiffhomepage
path: root/zluda/src/impl/device.rs
diff options
context:
space:
mode:
Diffstat (limited to 'zluda/src/impl/device.rs')
-rw-r--r--zluda/src/impl/device.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/zluda/src/impl/device.rs b/zluda/src/impl/device.rs
index 9782aad..a2a56c9 100644
--- a/zluda/src/impl/device.rs
+++ b/zluda/src/impl/device.rs
@@ -300,6 +300,10 @@ pub(crate) fn get_properties(prop: &mut cuda_types::CUdevprop, dev: hipDevice_t)
Ok(())
}
+pub(crate) fn get_count(count: &mut ::core::ffi::c_int) -> hipError_t {
+ unsafe { hipGetDeviceCount(count) }
+}
+
fn clamp_usize(x: usize) -> i32 {
usize::min(x, i32::MAX as usize) as i32
}