-
Notifications
You must be signed in to change notification settings - Fork 618
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
Adjust Operator::Run to take reference instead of pointer #1168
Conversation
Signed-off-by: Krzysztof Lecki <klecki@nvidia.com>
!build |
CI MESSAGE: [857155]: BUILD STARTED |
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 can write something more than just yes
in What was changed, added, removed?
.
Other than that LGTM.
CI MESSAGE: [857155]: BUILD FAILED |
CI MESSAGE: [857155]: BUILD PASSED |
Done. :(
|
Regarding the Operator::RunImpl, as some users with custom ops may be using it, I can maybe provide the old overload there with [[deprecated]] attribute, leave it for one release and remove in the next one. What do you think? We don't promise that the C++ API won't change. |
Sounds good. I guess we cannot put any compilation time warning for the users so they know they need to change something sooner than we remove it in the next release. |
I'm still thinking about it, and it would require us to call old signature as a fallback in the new one, which makes the RunImpl not pure virtual. I don't think it is worth it. |
Signed-off-by: Krzysztof Lecki klecki@nvidia.com
Why we need this PR?
What happened in this PR?
The Operator::Run and RunImpl signatures are changed from accepting
pointer to workspace
toreference to workspace
.This is more C++ way of things and matches the signature of
Setup
.Run, RunImpl and similar signatures where changed from (Workspace *ws) to (Workspace &ws),
access to ws changed from
ws->x
tows.x
. For some functions call was changed fromfun(ws)
tofun(&ws)
, as I intended to change only Run and related functions.Mostly mechanical changes. Check if there is no docs mismatch.
CI
Yes, dummy plugin was also updated.
Would be nice to followup with adjusting
GetArgument
to take a ref.JIRA TASK: [DALI-XXXX]