aboutsummaryrefslogtreecommitdiffhomepage
path: root/level_zero/src/ze.rs
diff options
context:
space:
mode:
authorAndrzej Janik <[email protected]>2020-11-14 15:48:05 +0100
committerAndrzej Janik <[email protected]>2020-11-14 15:48:05 +0100
commiteac5fbd806639c42813d06095fd3911a4664538b (patch)
tree9b1215f8b1c381e3ea5a1f4393b3533d2cdf1fd2 /level_zero/src/ze.rs
parenta6765baa3a91b80a7724e05973e2de6746c958d7 (diff)
downloadZLUDA-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.rs6
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> {