Skip to content

Support use in CUDA device-side code #17

Open

Description

@eyalroz

nVIDIA's CUDA is a popular ecosystem for general-purpose GPU programming. Essentially, in CUDA, you write kernels to be executed on a GPU using a slightly-restricted variant of C++. However, you need to annotate functions which run the the GPU-device-side as __device__. (For constexpr function this can be skipped, but only with a certain compiler flag which shouldn't be relied upon.) Also, any host-side code of the standard C++ library is not usable.

I would like to ask that this span implementation be adapted for use with CUDA. I've done something similar for std::array, although there's a bit of unnecessary boilerplate in my additions there.

Activity

  1. tcbrindle commented on Sep 12, 2019

    @tcbrindle
    Owner

    Hi @eyalroz, thanks for your interest in this library.

    I'm afraid I have no experience with CUDA and no access to Nvidia hardware, so this is not something I would be able to do myself. However I'd be happy to accept patches for CUDA support (suitably protected by macros of course) if you or someone else would like to add it.

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions