Skip to main content

AreaPtx

Struct AreaPtx 

Source
pub struct AreaPtx { /* private fields */ }
Expand description

The PTX variants of one area embedded by this build

A tier feature may embed an older variant when that is the best the area ships. Every variant exports the same kernels with the same parameters, which cudakit-build checks, so the host can load any of them

Implementations§

Source§

impl AreaPtx

Source

pub const EMPTY: Self

An area with no embedded variant yet; add them with Self::with

Source

pub const fn baseline(sm75: Option<EmbeddedPtx>) -> Self

An area that ships only the baseline variant

Source

pub const fn with(self, tier: PtxTier, ptx: Option<EmbeddedPtx>) -> Self

This area with ptx as its tier variant, usually from embed_tier!, which is None when the build does not embed it

Source

pub fn fixture(variants: &[(PtxTier, &'static str)]) -> Self

Available on crate feature test-support only.

Embedded variants without cubins, for host-only tests such as a fake higher tier

Source

pub fn iter(&self) -> impl Iterator<Item = (PtxTier, &'static str)>

The embedded variants, lowest tier first

Source

pub fn embedded(&self, tier: PtxTier) -> Option<EmbeddedPtx>

The embedded bytes for one specific tier

Source

pub fn runnable_tier( self, limit: PtxTier, device: ComputeCapability, ) -> Option<PtxTier>

The highest runnable embedded tier, without hashing its artifact

Source

pub fn driver_request<K: KernelArea>( self, area: K, limit: PtxTier, device: ComputeCapability, ) -> Option<ModuleRequest<K>>

The best runnable tier and this device’s exact cubin, or its PTX when the area embeds no cubin for the device

Source

pub fn select(&self, limit: PtxTier) -> Option<(PtxTier, &'static str)>

The highest embedded variant at or below limit, regardless of device

Trait Implementations§

Source§

impl Clone for AreaPtx

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for AreaPtx

Source§

impl Debug for AreaPtx

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AreaPtx

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more