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

Rename namespace alpaka::concepts to alpaka::inteface #2410

Merged

Conversation

SimeonEhrig
Copy link
Member

Rename the alpaka namespace alpaka::concepts to alpaka::interface because it can be easily mixed up with C++20 concepts. But alpaka::concepts functionality does not implement C++20 with C++17. Instead it allows to implement a type hierarchy allows to check for it. That's a similar concept like Java interfaces. Therefore we name it interface now.

- replace the term concept in Concepts.hpp with interface e.g. for documentation, function names, template types and so one
- also rename ConceptsTest.cpp to InterfaceTest.cpp
@SimeonEhrig SimeonEhrig added this to the 2.0.0 milestone Oct 3, 2024
@SimeonEhrig
Copy link
Member Author

@fwyzard Can you please have a look on it. I will also talk to @psychocoderHPC afterwards.

@psychocoderHPC
Copy link
Member

I am fine with this change, this makes the way free for concepts.

@@ -61,13 +61,13 @@ namespace alpaka

//! True if TDev is a device, i.e. if it implements the ConceptDev concept.
Copy link
Member

Choose a reason for hiding this comment

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

please check the documentation. I will merge it but we should change it in a follow up PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's something which I realized during the work at the alpaka::concepts::Tag PR. Each class which uses alpaka::interface needs to define a class, where it use it for the inheritance hierarchy. I didn't changed it in this PR, because it does not affect the functionality of the alpaka::interface functions.

I can rename all the classes in an extra PR. Also they don't follow an specific name scheme. For alpaka::concepts::Tag I use the following Interface class:

struct InterfaceTag;

Maybe I can overtake the name scheme for all other classes.

@psychocoderHPC psychocoderHPC merged commit f778f87 into alpaka-group:develop Oct 7, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants