Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Trivial] add GetSize and GetIndex to sparse pack #1081

Merged
merged 3 commits into from
May 21, 2024

Conversation

Yurlungur
Copy link
Collaborator

@Yurlungur Yurlungur commented May 20, 2024

PR Summary

Upstreaming a few features we use in riot. Mainly a cheap way of getting the number of sparse IDs of a variable on a block and the "index" in the pack on a given block.

PR Checklist

  • Code passes cpplint
  • New features are documented.
  • Adds a test for any bugs fixed. Adds tests for new features.
  • Code is formatted
  • Changes are summarized in CHANGELOG.md
  • Change is breaking (API, behavior, ...)
    • Change is additionally added to CHANGELOG.md in the breaking section
    • PR is marked as breaking
    • Short summary API changes at the top of the PR (plus optionally with an automated update/fix script)
  • CI has been triggered on Darwin for performance regression tests.
  • Docs build
  • (@lanl.gov employees) Update copyright on changed files

@Yurlungur Yurlungur added the enhancement New feature or request label May 20, 2024
@Yurlungur Yurlungur self-assigned this May 20, 2024
@Yurlungur Yurlungur enabled auto-merge May 20, 2024 17:42
Copy link
Collaborator

@pdmullen pdmullen left a comment

Choose a reason for hiding this comment

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

LGTM! if you are feeling brave, these can also be added to SwarmPacks

Copy link
Collaborator

@lroberts36 lroberts36 left a comment

Choose a reason for hiding this comment

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

LGTM

src/interface/sparse_pack.hpp Outdated Show resolved Hide resolved
@Yurlungur
Copy link
Collaborator Author

LGTM! if you are feeling brave, these can also be added to SwarmPacks

Can you click approve? Also are these relevant to SwarmPacks? I guess GetIndex is but since swarms don't have sparse IDs I don't think GetSize provides much value.

@Yurlungur Yurlungur disabled auto-merge May 20, 2024 18:02
@pdmullen
Copy link
Collaborator

LGTM! if you are feeling brave, these can also be added to SwarmPacks

Can you click approve? Also are these relevant to SwarmPacks? I guess GetIndex is but since swarms don't have sparse IDs I don't think GetSize provides much value.

The member functions are more or less consistent between SparsePacks and SwarmPacks, so it might seem natural to add them, however, as you add, I also don't see an immediate need for them...

@Yurlungur Yurlungur enabled auto-merge May 20, 2024 18:07
@Yurlungur Yurlungur disabled auto-merge May 20, 2024 18:36
@Yurlungur Yurlungur enabled auto-merge May 21, 2024 16:05
@Yurlungur Yurlungur merged commit 1bb0bd4 into develop May 21, 2024
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants