pub struct ContextBuilder { /* private fields */ }Expand description
Builder for ComputeContext
Implementations§
Source§impl ContextBuilder
impl ContextBuilder
pub fn new() -> Self
pub fn app_name(self, name: impl Into<String>) -> Self
pub fn enable_validation(self) -> Self
pub fn prefer_vendor(self, vendor: impl Into<String>) -> Self
Sourcepub fn prefer_icd_path<P: Into<PathBuf>>(self, path: P) -> Self
pub fn prefer_icd_path<P: Into<PathBuf>>(self, path: P) -> Self
Prefer a specific ICD by its resolved library path
Sourcepub fn prefer_icd_index(self, index: usize) -> Self
pub fn prefer_icd_index(self, index: usize) -> Self
Prefer a specific ICD by index (from available_icds())
pub fn build(self) -> Result<ComputeContext>
Auto Trait Implementations§
impl Freeze for ContextBuilder
impl RefUnwindSafe for ContextBuilder
impl Send for ContextBuilder
impl Sync for ContextBuilder
impl Unpin for ContextBuilder
impl UnwindSafe for ContextBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more