diff options
author | Andrzej Janik <[email protected]> | 2020-11-14 15:48:05 +0100 |
---|---|---|
committer | Andrzej Janik <[email protected]> | 2020-11-14 15:48:05 +0100 |
commit | eac5fbd806639c42813d06095fd3911a4664538b (patch) | |
tree | 9b1215f8b1c381e3ea5a1f4393b3533d2cdf1fd2 /level_zero/src/ze.rs | |
parent | a6765baa3a91b80a7724e05973e2de6746c958d7 (diff) | |
download | ZLUDA-eac5fbd806639c42813d06095fd3911a4664538b.tar.gz ZLUDA-eac5fbd806639c42813d06095fd3911a4664538b.zip |
Support more property queries
Diffstat (limited to 'level_zero/src/ze.rs')
-rw-r--r-- | level_zero/src/ze.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/level_zero/src/ze.rs b/level_zero/src/ze.rs index 4267682..321e492 100644 --- a/level_zero/src/ze.rs +++ b/level_zero/src/ze.rs @@ -833,6 +833,12 @@ impl<'a> Kernel<'a> { check!(sys::zeKernelSetGroupSize(self.0, x, y, z));
Ok(())
}
+
+ pub fn get_properties(&self) -> Result<Box<sys::ze_kernel_properties_t>> {
+ let mut props = Box::new(unsafe { mem::zeroed::<sys::ze_kernel_properties_t>() });
+ check!(sys::zeKernelGetProperties(self.0, props.as_mut() as *mut _));
+ Ok(props)
+ }
}
impl<'a> Drop for Kernel<'a> {
|