added DeviceCacheSettings

This commit is contained in:
Evghenii
2014-01-08 15:38:02 +01:00
parent 69c5e0aae7
commit a401eb5a3b
2 changed files with 12 additions and 2 deletions

View File

@@ -133,7 +133,7 @@ struct Uniform
data[chunkIdx] = shdata[programIndex];
}
};
#elif 1
#elif 0
template<typename T, int N>
struct Uniform
{
@@ -174,7 +174,7 @@ __shared__ int shdata_full[4*MAX_LIGHTS];
template<typename T, int N>
struct Uniform
{
volatile T *shdata;
/* volatile */ T *shdata;
__device__ Uniform()
{

View File

@@ -141,6 +141,16 @@ namespace parser
s << printArgumentList();
s << "\n )\n";
s << "{\n ";
// s << " cudaFuncSetCacheConfig (" << calleeName << ", ";
s << " cudaDeviceSetCacheConfig (";
#if 1
s << " cudaFuncCachePreferEqual ";
#elif 1
s << " cudaFuncCachePreferL1 ";
#else
s << " cudaFuncCachePreferShared ";
#endif
s << ");\n";
s << calleeName;
s << "<<<1,32>>>(\n";
s << printArgumentList(false);