Skip to main content

FunctionAttributes

Struct FunctionAttributes 

Source
pub struct FunctionAttributes {
Show 16 fields pub shared_size_bytes: usize, pub const_size_bytes: usize, pub local_size_bytes: usize, pub max_threads_per_block: i32, pub num_regs: i32, pub ptx_version: i32, pub binary_version: i32, pub cache_mode_ca: bool, pub max_dynamic_shared_size_bytes: i32, pub preferred_shared_memory_carveout: i32, pub cluster_dim_must_be_set: bool, pub required_cluster_width: i32, pub required_cluster_height: i32, pub required_cluster_depth: i32, pub cluster_scheduling_policy_preference: i32, pub non_portable_cluster_size_allowed: bool,
}
Expand description

Function resource usage, compilation versions, and launch constraints queried from CUDA.

These values describe the function in its module context; device and compiler choices can affect them.

Fields§

§shared_size_bytes: usize

Statically allocated shared memory per block in bytes, excluding dynamic launch-time shared memory.

§const_size_bytes: usize

User-allocated constant memory required by the function in bytes.

§local_size_bytes: usize

Local memory used per thread in bytes.

§max_threads_per_block: i32

Maximum number of threads per block permitted for this function on the device.

§num_regs: i32

Number of registers used per thread.

§ptx_version: i32

PTX virtual architecture version, encoded as major * 10 + minor. May be zero for cubins compiled before CUDA 3.0.

§binary_version: i32

Binary architecture version, encoded as major * 10 + minor. Legacy cubins without an encoded version report 10.

§cache_mode_ca: bool

Whether the function was compiled with the -Xptxas --dlcm=ca cache setting.

§max_dynamic_shared_size_bytes: i32

Maximum dynamic shared memory permitted per block for this function, in bytes.

§preferred_shared_memory_carveout: i32

Preferred percentage of shared L1/shared-memory resources assigned to shared memory. This is a hint; CUDA may choose another ratio.

§cluster_dim_must_be_set: bool

Whether launches must specify a valid cluster size.

§required_cluster_width: i32

Required cluster width in blocks; zero means no required width is set.

§required_cluster_height: i32

Required cluster height in blocks; zero means no required height is set.

§required_cluster_depth: i32

Required cluster depth in blocks; zero means no required depth is set.

§cluster_scheduling_policy_preference: i32

Native cluster scheduling policy preference value.

§non_portable_cluster_size_allowed: bool

Whether the function permits cluster sizes beyond the portable limit.

Trait Implementations§

Source§

impl Clone for FunctionAttributes

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 FunctionAttributes

Source§

impl Debug for FunctionAttributes

Source§

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

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

impl Eq for FunctionAttributes

Source§

impl PartialEq for FunctionAttributes

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FunctionAttributes

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.