This commit is contained in:
Gregory Burd 2024-05-28 15:09:05 -04:00
parent a55f05c91b
commit dc30baea0a

View file

@ -678,7 +678,7 @@ void __attribute__((format(printf, 4, 5))) __skip_diag_(const char *file, int li
\ \
/* (a) Check the decent condition: \ /* (a) Check the decent condition: \
* u_hits <= m_total_hits / (2 ^ (k_threshold - height of node)) \ * u_hits <= m_total_hits / (2 ^ (k_threshold - height of node)) \
* When met we: \ * When met we: \
* 1) traverse the path backward, and... \ * 1) traverse the path backward, and... \
* 2) propagate path[i].level[i] hits backward along path, and... \ * 2) propagate path[i].level[i] hits backward along path, and... \
* 3) adjust any forward pointers along the way, then... \ * 3) adjust any forward pointers along the way, then... \
@ -692,25 +692,21 @@ void __attribute__((format(printf, 4, 5))) __skip_diag_(const char *file, int li
/* 1) go backwards along path from where we are until head */ \ /* 1) go backwards along path from where we are until head */ \
cur = &path[i]; \ cur = &path[i]; \
cur_hits = cur->node->field.sle_levels[cur->in].hits; \ cur_hits = cur->node->field.sle_levels[cur->in].hits; \
do { \ prv_node = (*(p + 1)).node->entries.sle_levels[path_u.in].next; \
prv_node = (*(p + 1)).node->entries.sle_levels[path_u.in].next; \ /* 2) propagate hits */ \
\ prv_hits = prv_node->field.sle_levels[cur->in].hits; \
/* 2) propagate hits */ \ prv_node->field.sle_levels[cur->in].hits += 1; \
prv_hits = prv_node->field.sle_levels[cur->in].hits; \ cur_hits = prv_hits; \
prv_node->field.sle_levels[cur->in].hits += 1; \ /* 3) adjust forward pointers */ \
cur_hits = prv_hits; \ if (prv_node->field.sle_levels[cur->in].next == cur->node) \
/* 3) adjust forward pointers */ \ prv_node->field.sle_levels[cur->in].next = cur->node->field.sle_levels[cur->in].next; \
if (prv_node->field.sle_levels[cur->in].next == cur->node) \
prv_node->field.sle_levels[cur->in].next = cur->node->field.sle_levels[cur->in].next; \
cur++; \
} while (cur->node != slist->slh_head); \
/* 4) reduce height by one */ \ /* 4) reduce height by one */ \
cur->node->field.sle_height--; \ cur->node->field.sle_height--; \
} \ } \
} \ } \
/* (b) Check the ascent condition: \ /* (b) Check the ascent condition: \
* path[i].pu + node_hits > hits total / (2 ^ (height of head - height of node - 1)) \ * path[i].pu + node_hits > hits total / (2 ^ (height of head - height of node - 1)) \
* When met we: \ * When met we: \
* 1) check the ascent condition, then iff true ... \ * 1) check the ascent condition, then iff true ... \
* 2) add a level, and ... \ * 2) add a level, and ... \
* 3) set its hits to the prev node at intersection height \ * 3) set its hits to the prev node at intersection height \