|
From: <sv...@va...> - 2008-03-23 18:12:23
|
Author: bart
Date: 2008-03-23 18:12:24 +0000 (Sun, 23 Mar 2008)
New Revision: 7765
Log:
Changed number of cached lookups from two to four.
Modified:
branches/DRDDEV/exp-drd/drd_bitmap.h
Modified: branches/DRDDEV/exp-drd/drd_bitmap.h
===================================================================
--- branches/DRDDEV/exp-drd/drd_bitmap.h 2008-03-23 17:13:30 UTC (rev 7764)
+++ branches/DRDDEV/exp-drd/drd_bitmap.h 2008-03-23 18:12:24 UTC (rev 7765)
@@ -172,7 +172,7 @@
struct bitmap2* bm2;
};
-#define N_CACHE_ELEM 2
+#define N_CACHE_ELEM 4
/* Complete bitmap. */
struct bitmap
@@ -216,7 +216,30 @@
{
tl_assert(bm);
- bm->cache[1] = bm->cache[0];
+#if N_CACHE_ELEM > 8
+#error Please update the code below.
+#endif
+#if N_CACHE_ELEM >= 8
+ bm->cache[7] = bm->cache[6];
+#endif
+#if N_CACHE_ELEM >= 7
+ bm->cache[6] = bm->cache[5];
+#endif
+#if N_CACHE_ELEM >= 6
+ bm->cache[5] = bm->cache[4];
+#endif
+#if N_CACHE_ELEM >= 5
+ bm->cache[4] = bm->cache[3];
+#endif
+#if N_CACHE_ELEM >= 4
+ bm->cache[3] = bm->cache[2];
+#endif
+#if N_CACHE_ELEM >= 3
+ bm->cache[2] = bm->cache[1];
+#endif
+#if N_CACHE_ELEM >= 2
+ bm->cache[1] = bm->cache[0];
+#endif
bm->cache[0].a1 = a1;
bm->cache[0].bm2 = bm2;
}
|