pub struct Kernels { /* private fields */ }Implementations§
Source§impl Kernels
impl Kernels
Sourcepub fn new(device: Device) -> Result<Self, String>
pub fn new(device: Device) -> Result<Self, String>
Starts the compile threads and builds tier 0 (blocking): every op’s kernel, so a new structure renders op by op at once (the live player, the render service).
Sourcepub fn on_demand(device: Device) -> Result<Self, String>
pub fn on_demand(device: Device) -> Result<Self, String>
Starts the compile threads and builds the utility kernels only;
an op’s tier-0 kernel compiles when something first needs it
(Kernels::tier0_kernel). For one render that waits for its
fused kernels anyway (an export, a frame): the first run after an
install or an upgrade doesn’t compile ~30 kernels it never uses
(about 0.9 s on 8 threads).
pub fn tier0(&self, func: &str) -> Option<&Tier0>
Sourcepub fn tier0_kernel(&self, func: &str) -> Result<Kernel, String>
pub fn tier0_kernel(&self, func: &str) -> Result<Kernel, String>
The tier-0 kernel for op function func, compiled now if it hasn’t
been (blocks until it is).
Sourcepub fn request(&self, kernels: Vec<(String, String)>) -> usize
pub fn request(&self, kernels: Vec<(String, String)>) -> usize
Queues kernels that are not known yet. Returns how many were queued.
pub fn get(&self, key: &str) -> Option<KernelState>
Sourcepub fn wait(&self, key: &str) -> KernelState
pub fn wait(&self, key: &str) -> KernelState
Blocks until key is no longer pending.
pub fn utility(&self, name: &str) -> Kernel
pub fn pending(&self) -> usize
pub fn stats(&self) -> CompileStats
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Kernels
impl !UnwindSafe for Kernels
impl Forget for Kernels
impl Freeze for Kernels
impl Move for Kernels
impl Send for Kernels
impl Sync for Kernels
impl Unpin for Kernels
impl UnsafeUnpin for Kernels
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