Library/ManagedCuda/CudaContext.cs
/// <summary>
/// On devices where the L1 cache and shared memory use the same hardware
/// resources, this sets through <c>cacheConfig</c> 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 the function. Any function preference
/// set via <see cref="SetCacheConfig"/> will be preferred over this context-wide
/// setting. Setting the context-wide cache configuration to
/// <see cref="CUFuncCache.PreferNone"/> will cause subsequent kernel launches to prefer
/// to not change the cache configuration unless required to launch the kernel.<para/>
/// This setting does nothing on devices where the size of the L1 cache and
/// shared memory are fixed.<para/>
/// Launching a kernel with a different preference than the most recent
/// preference setting may insert a device-side synchronization point.
/// </summary>
/// <param name="cacheConfig"></param>
On devices where the L1 cache and shared memory use the same hardware
resources, this sets through cacheConfig will be preferred over this context-wide
setting. Setting the context-wide cache configuration to
will cause subsequent kernel launches to prefer
to not change the cache configuration unless required to launch the kernel.
This setting does nothing on devices where the size of the L1 cache and
shared memory are fixed.
Launching a kernel with a different preference than the most recent
preference setting may insert a device-side synchronization point.
On devices where the L1 cache and shared memory use the same hardware resources this sets through cacheConfig will be preferred over this context - wide setting . Setting the context - wide cache configuration to will cause subsequent kernel launches to prefer to not change the cache configuration unless required to launch the kernel . This setting does nothing on devices where the size of the L1 cache and shared memory are fixed . Launching a kernel with a different preference than the most recent preference setting may insert a device - side synchronization point .
public void SetCacheConfig(CUFuncCache cacheConfig)
		{
			if (disposed) throw new ObjectDisposedException(this.ToString());
			CUResult res;
			res = DriverAPINativeMethods.ContextManagement.cuCtxSetCacheConfig(cacheConfig);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuCtxSetCacheConfig", res));
			if (res != CUResult.Success) throw new CudaException(res);
		}
public void SetCacheConfig ( CUFuncCache cacheConfig ) { if ( disposed ) throw new ObjectDisposedException ( this . ToString ( ) ) ; CUResult res ; res = DriverAPINativeMethods . ContextManagement . cuCtxSetCacheConfig ( cacheConfig ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; }
On devices where the L1 cache and shared memory use the same hardware
resources, this sets through cacheConfig will be preferred over this context-wide
setting.
On devices where the L1 cache and shared memory use the same hardware resources this sets through cacheConfig will be preferred over this context - wide setting .
cacheConfig
CUFuncCache
None