Skip to content
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

Consolidate make_tt_tpl and make_tt #297

Merged
merged 6 commits into from
Nov 1, 2024

Conversation

devreal
Copy link
Contributor

@devreal devreal commented Sep 3, 2024

We can map make_tt_tpl onto the same mechanism we use for make_tt by adding a template template parameter that signals whether arguments are passed as tuple or unpacked.

This is an attempt to clean up the implementation and to open the door for device-support in ttg::make_tt_tpl.

We can map make_tt_tpl onto the same mechanism we use for make_tt
by adding a template template parameter that signals whether arguments
are passed as tuple or unpacked.

Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
@devreal devreal requested a review from evaleev September 3, 2024 22:16
Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>

// final_action allows you to ensure something gets run at the end of a scope
template <class F>
class final_action
Copy link
Contributor

Choose a reason for hiding this comment

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

we might want to consider something more fully featured like https://github.com/justusc/deferral

Copy link
Contributor

Choose a reason for hiding this comment

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

at least let's rename to match what will eventually land in C++: https://en.cppreference.com/w/cpp/experimental/scope_exit/scope_exit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I took the implementation from https://github.com/tandasat/ScopedResource/ and slightly adopted it.

Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
@devreal
Copy link
Contributor Author

devreal commented Nov 1, 2024

@evaleev I replace finally with exit_scope. I think this is ready to go.

@evaleev evaleev merged commit 2ec6982 into TESSEorg:master Nov 1, 2024
4 checks passed
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