From 3f41f21acb51f7a1d305630dc2a4e5c5df5e4a83 Mon Sep 17 00:00:00 2001 From: Andrzej Janik Date: Thu, 24 Sep 2020 01:54:16 +0200 Subject: Implement more host code, moving execution further --- level_zero/src/ze.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'level_zero') diff --git a/level_zero/src/ze.rs b/level_zero/src/ze.rs index cee736c..16b9130 100644 --- a/level_zero/src/ze.rs +++ b/level_zero/src/ze.rs @@ -118,6 +118,12 @@ impl Device { Ok(props) } + pub fn get_compute_properties(&self) -> Result> { + let mut props = Box::new(unsafe { mem::zeroed::() }); + check! { sys::zeDeviceGetComputeProperties(self.0, props.as_mut()) }; + Ok(props) + } + pub unsafe fn mem_alloc_device( &mut self, ctx: &mut Context, -- cgit v1.2.3