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-only and GPU architecture independence #97

Open
stotko opened this issue Feb 11, 2020 · 3 comments
Open

Header-only and GPU architecture independence #97

stotko opened this issue Feb 11, 2020 · 3 comments
Labels
Milestone

Comments

@stotko
Copy link
Owner

stotko commented Feb 11, 2020

In contrast to boost, thrust and others, stdgpu is not a header-only library and, hence, requires shipping a compiled library. The following module currently require source file compilation:

  • bitset: Contains host-only functions which also contain code executed on the device.
  • device: Contains a function relying on backend-specific host API functions.
  • iterator: Only contains a wrapper function to hide the dependency to memory from the header.
  • limits: Contains the definition of static member variables.
  • memory: Both the general as well as the backend-specific parts handle the allocation and memcpy parts in the sources. This includes some global variables that need to be converted to proper singletons.
  • mutex: Contains host-only functions which also contain code executed on the device.

Inlining bitset and mutex will make the library independent of the required GPU architecture, e.g. the compute capability set for CUDA. Even if we decide not to go for header-only, achieving architecture independence might be a good compromise.

@stotko stotko added this to the 2.0.0 milestone Feb 11, 2020
@stotko
Copy link
Owner Author

stotko commented Apr 26, 2020

In #104, the global variables in memory have been cleaned up.

@stotko
Copy link
Owner Author

stotko commented Oct 7, 2020

In #190, bitset and mutex have been inlined to achieve GPU architecture independence for the compiled library.

@stotko
Copy link
Owner Author

stotko commented May 24, 2023

In #326, limits has been inlined as the declarations became obsolete with C++17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant