1
2
3
|
__host__ cudaError_t cudaFuncSetCacheConfig ( const void* func, cudaFuncCache cacheConfig )
|
1
2
3
4
|
cudaFuncCachePreferNone = 0
//Default function cache configuration, no preference
|
1
2
3
4
|
cudaFuncCachePreferShared = 1
//Prefer larger shared memory and smaller L1 cache
|
1
2
3
4
|
cudaFuncCachePreferL1 = 2
//Prefer larger L1 cache and smaller shared memory
|
1
2
3
4
|
cudaFuncCachePreferEqual = 3
//Prefer equal size L1 cache and shared memory
|
1
2
3
4
5
6
7
8
|
// cache config function
cudaFuncSetCacheConfig(Kernel,cudaFuncCachePreferL1);
.....
Kernel<<< grid, threads, 0 >>>;
|