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
Create a new facility lcos::split_all #2239
Comments
A related facility would be:
|
Is the usecase more like this:
? |
In any case, the usecase as sketched above should be already supported out of the by the split_all functionality. |
@hkaiser yes. This is what I was asking for. @rasolca has a use case where matrix sub-blocks are processed and when a task completes, it returns a future which is consumed by two new tasks. One task needs the matrix data, the other task only needs to be triggered when the operation completes. In the larger DAG, each task is using a future from the upper-left and upper-right - taking the matrix from one, and synchronization only from the other. As this pattern repeats, one finds that one needs a shared_future for each task since two other tasks are always using each future. It turns out that it messes the code up because the shared_future returns a const ref which makes the code more complicated than it needs to be. The solution would be for each task to return a |
PS. I like the name |
I like that!
Unfortunately, it isn't possible to implement this without calling
|
Several people have been asking for a facility which allows to convert a future storing a tuple of values into a tuple of futures, each storing one of the elements of the original tuple:
Other possible names discussed were
unfuse()
orsplit_fused()
.Other things to add:
shared_future
(Adding split_future #2246)std::pair
(Adding split_future #2246)std::array
(Adding split_future #2246)The text was updated successfully, but these errors were encountered: