pub struct Enki {
pub window_context: Option<Arc<dyn Any + Send + Sync>>,
pub gpu_window: Option<Mutex<GpuWindow>>,
pub engine: Arc<EnkiEngine>,
}Expand description
The central handle to the Enki heterogeneous GPU runtime.
Manages Vulkan instance lifecycle, hardware devices, memory allocation heaps, and execution flows across host CPU and GPU silicon.
Fields§
§window_context: Option<Arc<dyn Any + Send + Sync>>§gpu_window: Option<Mutex<GpuWindow>>§engine: Arc<EnkiEngine>Implementations§
Source§impl Enki
impl Enki
Sourcepub fn builder() -> EnkiBuilder
pub fn builder() -> EnkiBuilder
Returns a new EnkiBuilder to configure runtime options before initialization.
Sourcepub fn init_windowed<W>(window: Arc<W>, width: u32, height: u32) -> Arc<Self> ⓘ
pub fn init_windowed<W>(window: Arc<W>, width: u32, height: u32) -> Arc<Self> ⓘ
Initializes a windowed GPU context with swapchain presentation support.
Sourcepub fn active() -> Arc<Self> ⓘ
pub fn active() -> Arc<Self> ⓘ
Returns an Arc clone of the currently active global Enki runtime instance.
pub fn begin_flow(&self) -> Flow<'_>
Sourcepub fn flow<R, F>(&self, f: F) -> R
pub fn flow<R, F>(&self, f: F) -> R
Records and executes an atomic compute and presentation flow, halting on execution error.
Sourcepub fn try_flow<R, F>(&self, f: F) -> Result<R>
pub fn try_flow<R, F>(&self, f: F) -> Result<R>
Records and executes an atomic flow, returning an explicit Result on failure.
Auto Trait Implementations§
impl !Freeze for Enki
impl !RefUnwindSafe for Enki
impl !UnwindSafe for Enki
impl Send for Enki
impl Sync for Enki
impl Unpin for Enki
impl UnsafeUnpin for Enki
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