summaryrefslogtreecommitdiff
path: root/src/main/SetupCache.c
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-04-30 14:05:18 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2003-04-30 14:05:18 +0000
commit6da68b54316dba9a67ea88f7d61d2db5d74de3b2 (patch)
treecd7997ec9b94b71b06fd5521c1b3af7167779aea /src/main/SetupCache.c
parent66195a1bf87cf8be125ddb4bc5c62e76e608b70b (diff)
Check for macros for cache size before using
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3203 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/SetupCache.c')
-rw-r--r--src/main/SetupCache.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/SetupCache.c b/src/main/SetupCache.c
index 27cadcc9..e118ae8a 100644
--- a/src/main/SetupCache.c
+++ b/src/main/SetupCache.c
@@ -50,8 +50,13 @@ int CCTKi_SetupCache (void)
}
else
{
+#ifdef CCTK_CACHE_SIZE
+ cache_size = CCTK_CACHE_SIZE;
+ cacheline_bytes = CCTK_CACHELINE_BYTES;
+#else
cache_size = CCTK_L2_CACHE_SIZE;
cacheline_bytes = CCTK_L2_CACHELINE_BYTES;
+#endif
}
Utili_CacheDataSet (cacheline_bytes, cache_size);