From 52c85316f62ccf8a2f0b2170b4d635028659caa0 Mon Sep 17 00:00:00 2001 From: Greg Burd Date: Mon, 1 Apr 2024 23:15:55 -0400 Subject: [PATCH] splay v1/p6; oversights --- include/sl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/sl.h b/include/sl.h index a4160f9..7a9fabf 100644 --- a/include/sl.h +++ b/include/sl.h @@ -636,11 +636,11 @@ void __attribute__((format(printf, 4, 5))) __skip_diag_(const char *file, int li if (path[i].node == slist->slh_head || path[i].node == slist->slh_tail) \ continue; \ \ - __SKIP_SUBTREE_CHu(decl, field, slist, path, 0) \ + __SKIP_SUBTREE_CHu(decl, field, slist, path, i) \ { \ hits_CHu += elm->field.sle_hits; \ } \ - __SKIP_SUBTREE_CHv(decl, field, slist, path, 0) \ + __SKIP_SUBTREE_CHv(decl, field, slist, path, i) \ { \ hits_CHv += elm->field.sle_hits; \ } \ @@ -687,7 +687,7 @@ void __attribute__((format(printf, 4, 5))) __skip_diag_(const char *file, int li */ \ /* 1) check ascent condition */ \ asc_cond = m_total_hits / pow(2.0, delta_height == 0 ? 0 : delta_height - 1); \ - if (path[i - 1].pu > asc_cond && path[i].node->field.sle_height < slist->slh_max_height - 1 && 0) { \ + if (path[i - 1].pu > asc_cond && path[i].node->field.sle_height < slist->slh_max_height - 1) { \ /* 2) increase height by one */ \ new_height = path[i].node->field.sle_height++; \ /* 3) update hit counter */ \