Skip to content

unify the storage of intermediate results#2069

Merged
ericniebler merged 1 commit intoNVIDIA:mainfrom
ericniebler:unify-storage-of-intermediate-results
May 6, 2026
Merged

unify the storage of intermediate results#2069
ericniebler merged 1 commit intoNVIDIA:mainfrom
ericniebler:unify-storage-of-intermediate-results

Conversation

@ericniebler
Copy link
Copy Markdown
Collaborator

@ericniebler ericniebler commented May 6, 2026

many async operations need to store the results of a child operation and send the results to a receiver later. in many places we are computing the type of a __variant of __tuples for holding these results, and then using a visitor to send the results. it's a lot of code repetition.

unify all of that into a __results_storage<Signatures...> type that has a .__complete(receiver) member function that encapsulates the visitation.

@ericniebler ericniebler force-pushed the unify-storage-of-intermediate-results branch from 010afa4 to 5359b7c Compare May 6, 2026 02:28
};

// Add storage for an exception_ptr if the result datums are not all nothrow
// decay-copyable.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why build the decay-copy into this utility? Robert has an analogous facility that stores references where this facility would transform references into decay-copied values. Could you layer the decay-copy on top?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I don't know where I would use a storage type that stores references. None of the algorithms are specified to do that.

@ericniebler ericniebler merged commit 8186c5d into NVIDIA:main May 6, 2026
61 of 62 checks passed
@ericniebler ericniebler deleted the unify-storage-of-intermediate-results branch May 6, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants