bugfix name map baking

This commit is contained in:
Ryan Fleury
2025-09-05 15:19:29 -07:00
parent 46ac437e86
commit 2f9006bb8a
+8 -4
View File
@@ -1126,7 +1126,7 @@ rdim2_bake(Arena *arena, RDIM_BakeParams *params)
} }
// rjf: next element hash doesn't match the active? -> push index run, clear active list, start new list // rjf: next element hash doesn't match the active? -> push index run, clear active list, start new list
if(hash != active_hash && active_idx_count != 0) if(hash != active_hash)
{ {
if(active_idx_count > 1) if(active_idx_count > 1)
{ {
@@ -1371,7 +1371,7 @@ rdim2_bake(Arena *arena, RDIM_BakeParams *params)
} }
} }
} }
rdim2_shared->lane_name_map_node_counts[k] += total_unique_name_count; rdim2_shared->lane_name_map_node_counts[k][lane_idx()] += total_unique_name_count;
} }
} }
} }
@@ -1477,7 +1477,10 @@ rdim2_bake(Arena *arena, RDIM_BakeParams *params)
} }
// rjf: next element hash doesn't match the active? -> push index run, clear active list, start new list // rjf: next element hash doesn't match the active? -> push index run, clear active list, start new list
if(hash != active_hash && active_idx_count != 0) if(hash != active_hash)
{
// rjf: has active hash -> flatten & serialize
if(active_hash != 0)
{ {
// rjf: flatten idxes // rjf: flatten idxes
RDI_U64 idxs_count = active_idx_count; RDI_U64 idxs_count = active_idx_count;
@@ -1499,12 +1502,13 @@ rdim2_bake(Arena *arena, RDIM_BakeParams *params)
{ {
dst_node->match_idx_or_idx_run_first = idxs[0]; dst_node->match_idx_or_idx_run_first = idxs[0];
} }
else else if(dst_node->match_count > 1)
{ {
dst_node->match_idx_or_idx_run_first = rdim_bake_idx_from_idx_run_2(bake_idx_runs, idxs, idxs_count); dst_node->match_idx_or_idx_run_first = rdim_bake_idx_from_idx_run_2(bake_idx_runs, idxs, idxs_count);
} }
dst_bucket->node_count += 1; dst_bucket->node_count += 1;
write_node_off += 1; write_node_off += 1;
}
// rjf: start new list // rjf: start new list
active_hash = hash; active_hash = hash;