use crate::ffi::*;
pub struct Pipeline {
raw: ObjcId,
}
impl Pipeline {
pub(crate) fn from_raw(raw: ObjcId) -> Self {
Pipeline { raw }
}
pub fn max_total_threads_per_threadgroup(&self) -> usize {
unsafe { msg0_usize(self.raw, SEL_maxTotalThreadsPerThreadgroup()) }
}
pub fn thread_execution_width(&self) -> usize {
unsafe { msg0_usize(self.raw, SEL_threadExecutionWidth()) }
}
#[mutants::skip] pub fn static_threadgroup_memory_length(&self) -> usize {
unsafe { msg0_usize(self.raw, SEL_staticThreadgroupMemoryLength()) }
}
pub fn as_raw(&self) -> ObjcId {
self.raw
}
}
impl Drop for Pipeline {
#[mutants::skip] fn drop(&mut self) {
unsafe { release(self.raw) };
}
}