-
Notifications
You must be signed in to change notification settings - Fork 9
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
2027: Create Runnable inside Objgroup's invoke #2039
2027: Create Runnable inside Objgroup's invoke #2039
Conversation
be99d06
to
37b4f63
Compare
37b4f63
to
3bab5fd
Compare
3bab5fd
to
2fa7392
Compare
Pipelines resultsPR tests (gcc-12, ubuntu, mpich) Build for 8820ec9 (2023-02-08 19:56:12 UTC)
PR tests (nvidia cuda 11.0, ubuntu, mpich) Build for 8820ec9 (2023-02-08 19:56:12 UTC)
PR tests (clang-9, ubuntu, mpich) Build for 8820ec9 (2023-02-08 19:56:12 UTC)
PR tests (gcc-7, ubuntu, mpich, trace runtime, LB) Build for 703a972 (2023-02-08 18:01:15 UTC)
PR tests (gcc-9, ubuntu, mpich, zoltan) Build for 8820ec9 (2023-02-08 19:56:12 UTC)
PR tests (clang-12, ubuntu, mpich) Build for 8820ec9 (2023-02-08 19:56:12 UTC)
PR tests (gcc-10, ubuntu, openmpi, no LB) Build for 8820ec9 (2023-02-08 19:56:12 UTC)
PR tests (clang-11, ubuntu, mpich) Build for 8820ec9 (2023-02-08 19:56:12 UTC)
PR tests (nvidia cuda 11.2, ubuntu, mpich) Build for ( UTC)
PR tests (intel icpc, ubuntu, mpich) Build for 8820ec9 (2023-02-08 19:56:12 UTC)
PR tests (clang-13, ubuntu, mpich) Build for 8820ec9 (2023-02-08 19:56:12 UTC)
PR tests (clang-10, ubuntu, mpich) Build for 8820ec9 (2023-02-08 19:56:12 UTC)
PR tests (gcc-8, ubuntu, mpich, address sanitizer) Build for 8820ec9 (2023-02-08 19:56:12 UTC)
PR tests (clang-14, ubuntu, mpich) Build for 8820ec9 (2023-02-08 19:56:12 UTC)
PR tests (gcc-11, ubuntu, mpich, json schema test) Build for 8820ec9 (2023-02-08 19:56:12 UTC)
|
3ac6c5d
to
d903adc
Compare
d903adc
to
caa92ea
Compare
Codecov Report
@@ Coverage Diff @@
## develop #2039 +/- ##
===========================================
+ Coverage 84.83% 84.87% +0.03%
===========================================
Files 720 720
Lines 25632 25639 +7
===========================================
+ Hits 21746 21760 +14
+ Misses 3886 3879 -7
|
src/vt/objgroup/manager.impl.h
Outdated
runnable::invoke<Type, f>(get(proxy), std::forward<Args>(args)...); | ||
result = std::move(ret); | ||
} | ||
}); |
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.
Does this all do the correct thing if f
returns an l-value reference to a moveable but non-copyable type? Without looking at FunctionWrapper
, if Ret
preserves the reference, then Ret result
just won't compile, I think.
My concern is that we may get back a reference to something that needs to be left alone, and then move from it.
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.
More deeply, is there a reason that runLambda
doesn't itself pass through the return value from the thing it runs, such that we could do
return runnable::makeRunnableVoid(...).runLambda([] {
return runnable::invoke<Type, f>(get(proxy), forward(args));
});
If it needs to manage making finish
calls on the various context bits, those could be move to a scope guard structure that will call them in their destructors, rather than in straight-line code, so that we can return without declaring temporaries that would need to be conscientious about reference types.
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.
Good point. Now that runLambda does it immediately we can push the return value through
Fixes #2027