-
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
Enable tracking through rectangular arrays #973
Enable tracking through rectangular arrays #973
Conversation
TrackerVisitor visit_tracker{params_}; | ||
return visit_tracker( |
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.
I wonder if it's worth having a template<class F> auto visit_tracker(F&&, UniverseId) const;
(and same for visit_transform
)?
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.
You mean something like:
template<class F> decltype(auto) OrangeTrackView::visit_tracker(F&& f, UniverseId uid)
{
TrackerVisitor visit{params_};
return visit(f, uid);
}
?
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.
@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.
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.
Thanks for trying that out. We can simplify the code in the future if needed.
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 work!
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.