summaryrefslogtreecommitdiff
path: root/ztable.c
diff options
context:
space:
mode:
authorGuido Martínez <mtzguido@gmail.com>2014-04-11 02:26:32 (GMT)
committerGuido Martínez <mtzguido@gmail.com>2014-04-11 02:26:32 (GMT)
commit9144bc5af3e260c2317e7c613bae0c7ad708eabb (patch)
treeb6ee44eb2346de46e6a49de4c60381a9f89afcd8 /ztable.c
parent26553c2b4f1845bdc772d937b7b1e7930bf5ebcb (diff)
downloadice-9144bc5af3e260c2317e7c613bae0c7ad708eabb.zip
ice-9144bc5af3e260c2317e7c613bae0c7ad708eabb.tar.gz
ice-9144bc5af3e260c2317e7c613bae0c7ad708eabb.tar.bz2
Andando!
Diffstat (limited to 'ztable.c')
-rw-r--r--ztable.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/ztable.c b/ztable.c
index 634759b..b6e96dc 100644
--- a/ztable.c
+++ b/ztable.c
@@ -4,12 +4,20 @@
int n_collision = 0;
+int NINSIDE = 0;
+
+struct bucket {
+ game g;
+ int n;
+ struct bucket *next;
+};
+
int NN;
-struct bucket * ztable[CFG_ZTABLE_SIZE];
+struct bucket * ztable[CFG_ZTABLE_SIZE] __attribute__((aligned(0x1000)));
void mark(game g) {
- int idx = g->zobrist % CFG_ZTABLE_SIZE;
+ u64 idx = g->zobrist % CFG_ZTABLE_SIZE;
struct bucket *p = ztable[idx];
@@ -31,7 +39,7 @@ void mark(game g) {
}
void unmark(game g) {
- int idx = g->zobrist % CFG_ZTABLE_SIZE;
+ u64 idx = g->zobrist % CFG_ZTABLE_SIZE;
struct bucket *p = ztable[idx];
@@ -62,7 +70,7 @@ void unmark(game g) {
}
int reps(game g) {
- int idx = g->zobrist % CFG_ZTABLE_SIZE;
+ u64 idx = g->zobrist % CFG_ZTABLE_SIZE;
struct bucket *p = ztable[idx];