Skip to content

Header-only and GPU architecture independence #97

Description

@stotko

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions