Skip to content

KeyValueSorter and CompressArray Improvements#350

Merged
adayton1 merged 15 commits intodevelopfrom
feature/probinso/mesh_gen_3
Dec 23, 2025
Merged

KeyValueSorter and CompressArray Improvements#350
adayton1 merged 15 commits intodevelopfrom
feature/probinso/mesh_gen_3

Conversation

@robinson96
Copy link
Collaborator

#Summary

CompressArray has learned two new modes, remove_flag and keep_flag, and now returns length of the resulting array.

KeyValueSorter can now sort by Key and then Valuie within matching keys.

Sum methods' return type is now a separate template parameter, allowing return of different types.

@dtaller
Copy link
Collaborator

dtaller commented Sep 30, 2025

Could you add tests for the new algorithms to the test/ folder? Besides that looks good

@adayton1
Copy link
Member

I want to merge this in before I release.

int numKept = 0;

// First, identify which elements to keep
SCAN_LOOP(i, 0, arrLen, pos, numKept, list[i] == 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the remove_flag_list and keep_flag_list cases be combined to one case that calculates keepIndices in two different ways?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could probably be simplified. I'm just upstreaming Peter's changes to our fork of CARE, so I'm hesitant to make additional changes.

@adayton1 adayton1 merged commit 10b0ca8 into develop Dec 23, 2025
7 checks passed
@adayton1 adayton1 deleted the feature/probinso/mesh_gen_3 branch December 23, 2025 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants