pub struct AllocationProfile { /* private fields */ }Expand description
One host-visible allocation profile and its complete device access set. Queries allocate no backing; allocation uses this exact profile and flags. Registration and external imports have separate native contracts and are not admitted by this allocation-only plan.
Implementations§
Source§impl AllocationProfile
impl AllocationProfile
Sourcepub fn supports_host_numa(&self) -> bool
pub fn supports_host_numa(&self) -> bool
Whether this allocating profile accepts an explicit host NUMA constraint. Node availability and native policy are checked during allocation.
Sourcepub fn maximum_bytes(&self) -> u64
pub fn maximum_bytes(&self) -> u64
Largest logical allocation admitted by this profile.
Sourcepub fn byte_granularity(&self) -> u64
pub fn byte_granularity(&self) -> u64
Required logical allocation length granularity.
Sourcepub fn allocate(
&self,
bytes: usize,
budget: Option<&MemoryBudget>,
) -> Result<Buffer>
pub fn allocate( &self, bytes: usize, budget: Option<&MemoryBudget>, ) -> Result<Buffer>
Allocate under precisely the queried construction contract.
Sourcepub fn visibility(
&self,
producer: MemorySite<'_>,
consumer: MemorySite<'_>,
) -> Result<ProspectiveVisibility>
pub fn visibility( &self, producer: MemorySite<'_>, consumer: MemorySite<'_>, ) -> Result<ProspectiveVisibility>
Qualify a directional visibility relation before allocating any backing. Returned facts retain this profile and all devices. They describe queue sites, not cache instructions executed within a shader.
Trait Implementations§
Source§impl Clone for AllocationProfile
impl Clone for AllocationProfile
impl Send for AllocationProfile
impl Sync for AllocationProfile
Auto Trait Implementations§
impl Freeze for AllocationProfile
impl RefUnwindSafe for AllocationProfile
impl Unpin for AllocationProfile
impl UnsafeUnpin for AllocationProfile
impl UnwindSafe for AllocationProfile
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more