Yes, simple classes have been (unofficially) supported in CUDA for a long time. They are mainly a compile-time feature and don’t require run-time support. Fermi adds support for function pointers, which will be used in the future to support virtual functions.
ah thanks!
does that mean that the code will be exactly the same either i use “struct” or “class” because the compiler will interpret it in the same way with capability 1.1?
or are there some speed issues?
class and struct keywords are pretty much the same thing in C++, they only differ semantically by the default visibility qualifier (private in class, public in struct). You can even mix inheritance between structs and classes.
It’s a common programming practice to use structs when the object is simple and has no methods and class otherwise, but it’s not enforced by the language and I believe it doesn’t make a difference for CUDA.