#[repr(C)]pub struct cudaFuncAttributes {
pub sharedSizeBytes: usize,
pub constSizeBytes: usize,
pub localSizeBytes: usize,
pub maxThreadsPerBlock: c_int,
pub numRegs: c_int,
pub ptxVersion: c_int,
pub binaryVersion: c_int,
pub cacheModeCA: c_int,
pub maxDynamicSharedSizeBytes: c_int,
pub preferredShmemCarveout: c_int,
}Expand description
CUDA function attributes
Fields§
The size in bytes of statically-allocated shared memory per block required by this function. This does not include dynamically-allocated shared memory requested by the user at runtime.
constSizeBytes: usizeThe size in bytes of user-allocated constant memory required by this function.
localSizeBytes: usizeThe size in bytes of local memory used by each thread of this function.
maxThreadsPerBlock: c_intThe maximum number of threads per block, beyond which a launch of the function would fail. This number depends on both the function and the device on which the function is currently loaded.
numRegs: c_intThe number of registers used by each thread of this function.
ptxVersion: c_intThe PTX virtual architecture version for which the function was compiled. This value is the major PTX version * 10 + the minor PTX version, so a PTX version 1.3 function would return the value 13.
binaryVersion: c_intThe binary architecture version for which the function was compiled. This value is the major binary version * 10 + the minor binary version, so a binary version 1.3 function would return the value 13.
cacheModeCA: c_intThe attribute to indicate whether the function has been compiled with user specified option “-Xptxas –dlcm=ca” set.
The maximum size in bytes of dynamic shared memory per block for this function. Any launch must have a dynamic shared memory size smaller than this value.
preferredShmemCarveout: c_intOn devices where the L1 cache and shared memory use the same hardware resources, this sets the shared memory carveout preference, in percent of the maximum shared memory. Refer to ::cudaDevAttrMaxSharedMemoryPerMultiprocessor. This is only a hint, and the driver can choose a different ratio if required to execute the function. See ::cudaFuncSetAttribute
Trait Implementations§
Source§impl Clone for cudaFuncAttributes
impl Clone for cudaFuncAttributes
Source§fn clone(&self) -> cudaFuncAttributes
fn clone(&self) -> cudaFuncAttributes
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more