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

Header name convention #38

Open
stotko opened this issue Dec 1, 2019 · 0 comments
Open

Header name convention #38

stotko opened this issue Dec 1, 2019 · 0 comments
Labels
Milestone

Comments

@stotko
Copy link
Owner

stotko commented Dec 1, 2019

Until now, the header names follow a simple convention. There are essentially three different types of extensions:

  • .h: Header files that can be used in both CUDA (.cu) and C++ (.cpp) code.
  • .cuh: Header files that can be used exclusively in CUDA (.cu) code.
  • no extension: Forward declaration files.

With the recent addition of an OpenMP backend, this scheme no longer fits as the device code is now also compiled in .cpp files. Furthermore, forward declarations follow a different convention which is also not obvious. This will also be the case for future backends. Thus, the current scheme is confusing and should be changed. Essentially, we have the following options:

  1. thrust-like scheme: Use .h for all files including forward declaration files. This has the advantage of being a simple and uniform solution, but makes above inclusion limitations less obvious.
  2. C++ STL-like scheme: Use no extension for all files. This would make the relation to the C++ standard library more obvious and is again a uniform solution. However, as most editors deduce the language from the file extension, we should think of a solution to keep syntax highlighting working.

Since the involving changes would lead to an API break, this will only be included in version 2.0.0.

@stotko stotko changed the title Header Header name convention Dec 1, 2019
@stotko stotko mentioned this issue Dec 1, 2019
2 tasks
@stotko stotko added this to the 2.0.0 milestone Dec 11, 2019
@stotko stotko added this to To do in stdgpu 2.0.0 via automation Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
stdgpu 2.0.0
  
To do
Development

No branches or pull requests

1 participant