TartanLlama / optional

C++11/14/17 std::optional with functional-style extensions and reference support
https://tl.tartanllama.xyz
Creative Commons Zero v1.0 Universal
859 stars 67 forks source link

nvcc and CUDA support #19

Open eyalroz opened 5 years ago

eyalroz commented 5 years ago

Has this optional class implementation been tested with CUDA? That is, compiled and tested with nvcc either for CPU-side code or adapted for GPU-device-side use and then compiled-and-tested?

If it has, it would be useful to have this mentioned in the documentation, and if GPU-device-side operation is also supported - have the methods decorated with host device when they're not constexpr (only when compiling with NVCC of course, i.e. a decoration macro which expands to nothing when not compiling with NVCC).

TartanLlama commented 5 years ago

I have not tested it with CUDA. I know someone tried it out with Thrust, but don't know how they got along. If you decide to try it, please let me know how it goes!

eyalroz commented 5 years ago

I was about to try it, but got stuck with a "standardese" issue, of it not noticing later alternative clang versions on my system. Perhaps I should open a separate bug here for not hard-depending on standardese, and just not building documentation if it's missing.

TartanLlama commented 5 years ago

Could do, although you can also pass -DOPTIONAL_ENABLE_DOCS=False to CMake to disable it.