span icon indicating copy to clipboard operation
span copied to clipboard

Support use in CUDA device-side code

Open eyalroz opened this issue 6 years ago • 1 comments
trafficstars

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.

eyalroz avatar Aug 18 '19 13:08 eyalroz

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.

tcbrindle avatar Sep 12 '19 14:09 tcbrindle