pub struct FaultAccelerator<A> { /* private fields */ }Expand description
Accelerator wrapper driven by a validated deterministic fault script.
Implementations§
Source§impl<A> FaultAccelerator<A>
impl<A> FaultAccelerator<A>
pub fn new(inner: A, script: FaultScript) -> Self
pub const fn inner(&self) -> &A
pub fn control(&self) -> FaultControl
Trait Implementations§
Source§impl<A: Accelerator> Accelerator for FaultAccelerator<A>
impl<A: Accelerator> Accelerator for FaultAccelerator<A>
Source§type Context = FaultContext<<A as Accelerator>::Context>
type Context = FaultContext<<A as Accelerator>::Context>
Owned context handle. It may be a native value and need not be boxed, cloneable, or thread
safe.
Source§type Buffer = FaultBuffer<<A as Accelerator>::Buffer>
type Buffer = FaultBuffer<<A as Accelerator>::Buffer>
Owned handle for the exact allocation described by its accompanying [
BufferInfo].Source§type Program = FaultProgram<<A as Accelerator>::Program>
type Program = FaultProgram<<A as Accelerator>::Program>
Owned resident-program handle with no borrow of its source artifact.
Source§type Queue = FaultQueue<<A as Accelerator>::Queue>
type Queue = FaultQueue<<A as Accelerator>::Queue>
Owned accelerator execution-queue handle.
Source§type Event = FaultEvent<<A as Accelerator>::Event>
type Event = FaultEvent<<A as Accelerator>::Event>
Owned submission and completion token with no borrow of the submitted binding slice.
Source§fn device_info(&self) -> Result<DeviceInfo, BackendError>
fn device_info(&self) -> Result<DeviceInfo, BackendError>
Return immutable identity, capability, and limit metadata. Read more
Source§fn create_context(
&self,
desc: ContextDesc,
) -> Result<Self::Context, BackendError>
fn create_context( &self, desc: ContextDesc, ) -> Result<Self::Context, BackendError>
Create one context from prevalidated intent. Read more
Source§fn destroy_context(
&self,
context: Self::Context,
) -> Result<(), ReleaseFailure<Self::Context>>
fn destroy_context( &self, context: Self::Context, ) -> Result<(), ReleaseFailure<Self::Context>>
Destroy an empty context. Read more
Source§fn allocate_buffer(
&self,
context: &Self::Context,
desc: BufferDesc,
) -> Result<AllocatedBuffer<Self::Buffer>, BackendError>
fn allocate_buffer( &self, context: &Self::Context, desc: BufferDesc, ) -> Result<AllocatedBuffer<Self::Buffer>, BackendError>
Allocate one exact provider-owned buffer backing. Read more
Source§fn write_buffer(
&self,
buffer: &mut Self::Buffer,
offset: u64,
data: &dyn ByteSource,
) -> Result<(), BackendError>
fn write_buffer( &self, buffer: &mut Self::Buffer, offset: u64, data: &dyn ByteSource, ) -> Result<(), BackendError>
Perform one explicit host-to-buffer transfer. Read more
Source§fn read_buffer(
&self,
buffer: &Self::Buffer,
offset: u64,
data: &mut dyn ByteSink,
) -> Result<(), BackendError>
fn read_buffer( &self, buffer: &Self::Buffer, offset: u64, data: &mut dyn ByteSink, ) -> Result<(), BackendError>
Perform one explicit buffer-to-host transfer. Read more
Source§fn free_buffer(
&self,
buffer: Self::Buffer,
) -> Result<(), ReleaseFailure<Self::Buffer>>
fn free_buffer( &self, buffer: Self::Buffer, ) -> Result<(), ReleaseFailure<Self::Buffer>>
Release an unreferenced buffer and its exact backing allocation. Read more
Source§fn load_program(
&self,
context: &Self::Context,
artifact: ArtifactRef<'_>,
) -> Result<Self::Program, BackendError>
fn load_program( &self, context: &Self::Context, artifact: ArtifactRef<'_>, ) -> Result<Self::Program, BackendError>
Create a resident program from an opaque, possibly segmented artifact. Read more
Source§fn unload_program(
&self,
program: Self::Program,
) -> Result<(), ReleaseFailure<Self::Program>>
fn unload_program( &self, program: Self::Program, ) -> Result<(), ReleaseFailure<Self::Program>>
Release an unreferenced resident program. Read more
Source§fn create_queue(
&self,
context: &Self::Context,
desc: QueueDesc,
) -> Result<Self::Queue, BackendError>
fn create_queue( &self, context: &Self::Context, desc: QueueDesc, ) -> Result<Self::Queue, BackendError>
Create one accelerator execution queue. Read more
Source§fn destroy_queue(
&self,
queue: Self::Queue,
) -> Result<(), ReleaseFailure<Self::Queue>>
fn destroy_queue( &self, queue: Self::Queue, ) -> Result<(), ReleaseFailure<Self::Queue>>
Release an unreferenced execution queue. Read more
Source§fn submit(
&self,
queue: &Self::Queue,
program: &Self::Program,
bindings: &[BindingRef<'_, Self::Buffer>],
timeout: Timeout,
) -> Result<Self::Event, SubmitFailure<Self::Event>>
fn submit( &self, queue: &Self::Queue, program: &Self::Program, bindings: &[BindingRef<'_, Self::Buffer>], timeout: Timeout, ) -> Result<Self::Event, SubmitFailure<Self::Event>>
Attempt to admit one program execution and return its event. Read more
Source§fn poll_event(&self, event: &Self::Event) -> Result<EventState, BackendError>
fn poll_event(&self, event: &Self::Event) -> Result<EventState, BackendError>
Observe event state without blocking or driving an executor. Read more
Auto Trait Implementations§
impl<A> !RefUnwindSafe for FaultAccelerator<A>
impl<A> !Send for FaultAccelerator<A>
impl<A> !Sync for FaultAccelerator<A>
impl<A> !UnwindSafe for FaultAccelerator<A>
impl<A> Freeze for FaultAccelerator<A>where
A: Freeze,
impl<A> Unpin for FaultAccelerator<A>where
A: Unpin,
impl<A> UnsafeUnpin for FaultAccelerator<A>where
A: UnsafeUnpin,
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