pub struct EventPoolDesc {
pub capacity: u32,
pub scope: EventScope,
/* private fields */
}Expand description
Descriptor for a zeEventPoolCreate call.
An event pool is a fixed-capacity arena of events. The recorder hands out
monotonically-increasing event indices via EventPoolDesc::alloc_event
until the pool is exhausted, modelling the index bookkeeping that the
device-gated zeEventCreate performs.
Fields§
§capacity: u32Maximum number of events the pool can hold.
scope: EventScopeVisibility scope applied to all events.
Implementations§
Source§impl EventPoolDesc
impl EventPoolDesc
Sourcepub fn new(capacity: u32, scope: EventScope) -> LevelZeroResult<Self>
pub fn new(capacity: u32, scope: EventScope) -> LevelZeroResult<Self>
Create a pool descriptor with capacity slots and scope visibility.
Sourcepub fn alloc_event(&mut self) -> LevelZeroResult<u32>
pub fn alloc_event(&mut self) -> LevelZeroResult<u32>
Reserve the next event index in the pool.
Returns LevelZeroError::OutOfMemory when the pool is exhausted.
Sourcepub fn is_host_visible(&self) -> bool
pub fn is_host_visible(&self) -> bool
true when host-side zeEventHostSynchronize is permitted.
Trait Implementations§
Source§impl Clone for EventPoolDesc
impl Clone for EventPoolDesc
Source§fn clone(&self) -> EventPoolDesc
fn clone(&self) -> EventPoolDesc
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EventPoolDesc
impl RefUnwindSafe for EventPoolDesc
impl Send for EventPoolDesc
impl Sync for EventPoolDesc
impl Unpin for EventPoolDesc
impl UnsafeUnpin for EventPoolDesc
impl UnwindSafe for EventPoolDesc
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