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

Enable tracking through rectangular arrays #973

Merged
merged 2 commits into from
Oct 12, 2023

Conversation

elliottbiondo
Copy link
Contributor

@elliottbiondo elliottbiondo commented Oct 10, 2023

This MR modifies OrangeTrackView to use the TrackerVisitor added in #959. This change does not impart any significant overhead, as evidenced by the plot below; running with pseudo array with and without static dispatch has no appreciable effect on timing.

Screen Shot 2023-10-11 at 3 58 38 PM

@elliottbiondo elliottbiondo marked this pull request as draft October 10, 2023 21:04
@sethrj sethrj added enhancement New feature or request orange Work on ORANGE geometry engine labels Oct 11, 2023
@sethrj sethrj changed the title Hook up static dispatch within OrangeTrackView Enable tracking through rectangular arrays Oct 11, 2023
@elliottbiondo elliottbiondo requested a review from sethrj October 11, 2023 17:25
@elliottbiondo elliottbiondo marked this pull request as ready for review October 11, 2023 17:25
src/orange/OrangeTrackView.hh Outdated Show resolved Hide resolved
src/orange/OrangeTrackView.hh Outdated Show resolved Hide resolved
src/orange/OrangeTrackView.hh Outdated Show resolved Hide resolved
src/orange/OrangeTrackView.hh Outdated Show resolved Hide resolved
src/orange/OrangeTrackView.hh Outdated Show resolved Hide resolved
src/orange/OrangeTrackView.hh Outdated Show resolved Hide resolved
src/orange/OrangeTrackView.hh Show resolved Hide resolved
src/orange/OrangeTrackView.hh Outdated Show resolved Hide resolved
src/orange/OrangeTrackView.hh Outdated Show resolved Hide resolved
Comment on lines +958 to +959
TrackerVisitor visit_tracker{params_};
return visit_tracker(
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if it's worth having a template<class F> auto visit_tracker(F&&, UniverseId) const; (and same for visit_transform)?

Copy link
Contributor Author

@elliottbiondo elliottbiondo Oct 11, 2023

Choose a reason for hiding this comment

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

You mean something like:

template<class F> decltype(auto) OrangeTrackView::visit_tracker(F&& f, UniverseId uid)
{
        TrackerVisitor visit{params_};
        return visit(f, uid);
}

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sethrj, I tried the code above, but I am getting type deduction errors, despite this the same API as what is done within TrackerVisit. The rest of this PR is good to go.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for trying that out. We can simplify the code in the future if needed.

Copy link
Member

@sethrj sethrj left a comment

Choose a reason for hiding this comment

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

Nice work!

@sethrj sethrj merged commit 194ff1c into celeritas-project:develop Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request orange Work on ORANGE geometry engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants