Skip to main content

cuCtxGetCacheConfig

Function cuCtxGetCacheConfig 

Source
pub unsafe extern "C" fn cuCtxGetCacheConfig(
    pconfig: *mut CUfunc_cache,
) -> CUresult
Expand description

Returns the preferred cache configuration for the current context.

On devices where the L1 cache and shared memory use the same hardware resources, this function returns through pconfig the preferred cache configuration for the current context. This is only a preference. The driver will use the requested configuration if possible, but it is free to choose a different configuration if required to execute functions.

This will return a pconfig of CUfunc_cache_enum::CU_FUNC_CACHE_PREFER_NONE on devices where the size of the L1 cache and shared memory are fixed.

The supported cache configurations are:

Note that this function may also return error codes from previous, asynchronous launches.

§Parameters

  • pconfig: Returned cache configuration

§Return value

See also: cuCtxCreate, cuCtxDestroy, cuCtxGetApiVersion, cuCtxGetDevice, cuCtxGetFlags, cuCtxGetLimit, cuCtxPopCurrent, cuCtxPushCurrent, cuCtxSetCacheConfig, cuCtxSetLimit, cuCtxSynchronize, cuFuncSetCacheConfig, cudaDeviceGetCacheConfig.