-
Notifications
You must be signed in to change notification settings - Fork 35
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
Insert SortTrackAction when sorting by particle type #1059
Insert SortTrackAction when sorting by particle type #1059
Conversation
Changing the "default" to spelling out the remaining options would be safer since clang will catch the omission. |
yes, I was considering doing that (or using pragma diagnostic switch-enum?) but given that we do a switch on that enum in many places and it's not likely to get updated often, I ended up leaving the default. Maybe just doing it in accel is fine since it's not closely related to SortTracksAction you're more likely to forget it here. |
For some reason github isn't letting me code review. Two comments:
|
Mmh, how would you test that? You have to instantiate
This doesn't need to be updated. This is used when sorting on a key that would allow to launch a kernel with a reduced grid size. This is not the case for particle_type. |
TrackSort.test.cc already does create core instances. You could manually call the initialize track action to set a bunch of primaries, then just manually call the sort action, then check that the order is correct? |
864bd4a
to
faa8f0b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement. Thanks for figuring out a way to add the tests!
I didn't update the switch statement which is inserting the SortTracksAction in #1044.
Also refactoring CoreState to only have the necessary thread_offsets_ collection, moving all the template code to the internal state struct
CoreStateThreadOffsets
.