Is it possible to use CUDA C for object oriented programming? Are there any classes in CUDA C like in C++?
CUDA does support classes, however not all C++ features are available. CUDA C++ support has significantly evolved over the time. Here is a non-exhaustive list of supported features:
--expt-relaxed-constexpr
allows to use any constexpr
host code in device code (powerful tool to reuse existing C++ code)nvc++
, a compiler that allows to write parallel C++ code using C++17 execution policies (more information on this page)nvcc
since version 3.0 uses g++ (in Linux) for compiling host code, so you can use the whole set of C++ features for the host part.
For the device code it supports restricted set of C++. But I think in the future releases of CUDA it will be more complete.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With