fixed a near-sure vmap bug
This commit is contained in:
parent
c698fc55c3
commit
544c920304
6
vmap.h
6
vmap.h
@ -98,7 +98,9 @@ static inline vmap_find_res search_all_vmap(vmap *map, uint32_t key, vmap_find_r
|
|||||||
/* Probably the loop exists always without this predicate being false */
|
/* Probably the loop exists always without this predicate being false */
|
||||||
while(level <= map->max_levels) {
|
while(level <= map->max_levels) {
|
||||||
/* Rare edge-case when last lane element was returned and we continue from it */
|
/* Rare edge-case when last lane element was returned and we continue from it */
|
||||||
if(prev.lane_abcd_next > 4) {
|
/* We should not try lane processing, just jump next level - but only if there */
|
||||||
|
/* is a next level (so last checked lane was totally filled already to full cap. */
|
||||||
|
if((prev.lane_abcd_next > 4) && (prev.last_found_lane_val != 0)) {
|
||||||
prev = vmap_search_all_begin();
|
prev = vmap_search_all_begin();
|
||||||
++level;
|
++level;
|
||||||
/* prev.level = level; // unnecessary, I hand-optimized out */
|
/* prev.level = level; // unnecessary, I hand-optimized out */
|
||||||
@ -130,7 +132,7 @@ static inline vmap_find_res search_all_vmap(vmap *map, uint32_t key, vmap_find_r
|
|||||||
int lane_next_begin = 0;
|
int lane_next_begin = 0;
|
||||||
|
|
||||||
/* Further lanes only needed if ours is fully filled */
|
/* Further lanes only needed if ours is fully filled */
|
||||||
/* Overlay simd and integer units here for perf */
|
/* Overlays SIMD and integer units here for perf */
|
||||||
uint32_t *afind = simd_map_lane_find(
|
uint32_t *afind = simd_map_lane_find(
|
||||||
lane_a,
|
lane_a,
|
||||||
key,
|
key,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user