Function rcudnn::cudaThreadGetCacheConfig[][src]

pub unsafe extern "C" fn cudaThreadGetCacheConfig(
    pCacheConfig: *mut cudaFuncCache
) -> cudaError
Expand description

\brief Returns the preferred cache configuration for the current device.

\deprecated

Note that this function is deprecated because its name does not reflect its behavior. Its functionality is identical to the non-deprecated function ::cudaDeviceGetCacheConfig(), which should be used instead.

On devices where the L1 cache and shared memory use the same hardware resources, this returns through \p pCacheConfig the preferred cache configuration for the current device. This is only a preference. The runtime 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 \p pCacheConfig of ::cudaFuncCachePreferNone on devices where the size of the L1 cache and shared memory are fixed.

The supported cache configurations are:

  • ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default)
  • ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache
  • ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory

\param pCacheConfig - Returned cache configuration

\return ::cudaSuccess \notefnerr \note_init_rt \note_callback

\sa ::cudaDeviceGetCacheConfig