Implement more host code, moving execution further

This commit is contained in:
Andrzej Janik 2020-09-24 01:54:16 +02:00
parent 03005140dd
commit 3f41f21acb
9 changed files with 241 additions and 37 deletions

View file

@ -118,6 +118,12 @@ impl Device {
Ok(props)
}
pub fn get_compute_properties(&self) -> Result<Box<sys::ze_device_compute_properties_t>> {
let mut props = Box::new(unsafe { mem::zeroed::<sys::ze_device_compute_properties_t>() });
check! { sys::zeDeviceGetComputeProperties(self.0, props.as_mut()) };
Ok(props)
}
pub unsafe fn mem_alloc_device(
&mut self,
ctx: &mut Context,