Skip to content

Migrate customization points to portability macros that support dispatching to named member functions#788

Closed
villevoutilainen wants to merge 97 commits intoNVIDIA:mainfrom
villevoutilainen:member-only-customization-points
Closed

Migrate customization points to portability macros that support dispatching to named member functions#788
villevoutilainen wants to merge 97 commits intoNVIDIA:mainfrom
villevoutilainen:member-only-customization-points

Conversation

@villevoutilainen
Copy link
Contributor

@villevoutilainen villevoutilainen commented Feb 25, 2023

Don't merge, for review only for now.

EDIT: The customization macros expand to one of three possible customization protocols:

  1. tag_invoke
  2. Named static member functions that take the CPO as a tag
  3. Named instance member function that take the CPO as a tag (with deducing this)

@villevoutilainen villevoutilainen force-pushed the member-only-customization-points branch from ff5939e to ed4bf39 Compare February 25, 2023 01:16
@villevoutilainen villevoutilainen force-pushed the member-only-customization-points branch from ed4bf39 to b91e2b3 Compare February 25, 2023 01:28
@ericniebler
Copy link
Collaborator

ericniebler commented Mar 4, 2023

I'm of half a mind to nuke execution_access. If you want to make your start() member function private, you can friend ::execution::start_t. Ditto for the other CPOs. EDIT: This is now done.

@ericniebler ericniebler changed the title Convert the start CPO to use member functions instead of tag_invoke Add macros for defining customizations and use them for the start CPO Mar 7, 2023
@ericniebler
Copy link
Collaborator

ericniebler commented Mar 15, 2023

EDIT: This is done. Saving for posterity.

======================================

Next steps on this PR:

Needs a helper for defining CPOs. At first, I'll want all CPO's to look first for obj.member(tag), then Obj::member(obj, tag), and finally tag_invoke(tag, obj) and deprecate the tag_invoke option. Then I'll want to drop tag_invoke but keep the other two, and (once everybody has deducing this) look only for the obj.member(tag) form. Ideally, I would only need to change this in one place.

I'm concerned about diagnostics during the transition. They're bad enough already, I don't want to make them any worse. I'll need to play around with ways to define these CPOs before we can forge ahead porting the other CPOs to members.

But it somebody beats me to it, all the better.

@ericniebler ericniebler force-pushed the member-only-customization-points branch from a7999cf to 2cf7829 Compare March 18, 2023 08:12
@ericniebler ericniebler force-pushed the member-only-customization-points branch from 2cf7829 to 9cec587 Compare March 18, 2023 08:25
@ericniebler
Copy link
Collaborator

/ok to test

@ericniebler
Copy link
Collaborator

/ok to test

@ericniebler
Copy link
Collaborator

/ok to test

@ericniebler
Copy link
Collaborator

/ok to test

@ericniebler
Copy link
Collaborator

/ok to test

@copy-pr-bot
Copy link

copy-pr-bot bot commented Sep 11, 2023

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ericniebler
Copy link
Collaborator

/ok to test

@ericniebler
Copy link
Collaborator

/ok to test

@ericniebler
Copy link
Collaborator

/ok to test

@ericniebler
Copy link
Collaborator

This effort will start again in a clean branch, since this PR is too far out of date.

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.

4 participants