diff options
author | Andrzej Janik <[email protected]> | 2021-01-08 19:43:46 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-08 19:43:46 +0100 |
commit | 5cd9a5fbc4b92c58a1db6f205559e690af30481b (patch) | |
tree | 43a4a85cddd462a43fa250421a8f26c447a33a7a /zluda/src/impl/device.rs | |
parent | 237a6c113a6c62e36dfa487e074f2b93d854039c (diff) | |
download | ZLUDA-5cd9a5fbc4b92c58a1db6f205559e690af30481b.tar.gz ZLUDA-5cd9a5fbc4b92c58a1db6f205559e690af30481b.zip |
Add empty implementation of cuDeviceGetLuid (#30)
This function is required by recent versions of CUDA runtime on Windows
Diffstat (limited to 'zluda/src/impl/device.rs')
-rw-r--r-- | zluda/src/impl/device.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/zluda/src/impl/device.rs b/zluda/src/impl/device.rs index 8fa24a8..29cac2d 100644 --- a/zluda/src/impl/device.rs +++ b/zluda/src/impl/device.rs @@ -3,7 +3,7 @@ use crate::cuda; use cuda::{CUdevice_attribute, CUuuid_st}; use std::{ cmp, mem, - os::raw::{c_char, c_int}, + os::raw::{c_char, c_int, c_uint}, ptr, sync::atomic::{AtomicU32, Ordering}, }; @@ -350,6 +350,13 @@ pub fn get_uuid(uuid: *mut CUuuid_st, dev_idx: Index) -> Result<(), CUresult> { Ok(()) } +// TODO: add support if Level 0 exposes it +pub fn get_luid(luid: *mut c_char, dev_node_mask: *mut c_uint, _dev_idx: Index) -> Result<(), CUresult> { + unsafe { ptr::write_bytes(luid, 0u8, 8) }; + unsafe { *dev_node_mask = 0 }; + Ok(()) +} + pub fn primary_ctx_get_state( dev_idx: Index, flags: *mut u32, |