Does CUDA support virtual function?

Hi. I’m trying to run CUDA programs on my 9600M GS card, with a compute capability of 1.1. I used abstract class and virtual functions in my device code as an interface. When compling, I got the error message:

identifier "__cxa_pure_virtual" is undefined

Does this due to that CUDA dosn’t support virtual functions? I’m using CUDA Toolkit 3.1.

Hi. I’m trying to run CUDA programs on my 9600M GS card, with a compute capability of 1.1. I used abstract class and virtual functions in my device code as an interface. When compling, I got the error message:

identifier "__cxa_pure_virtual" is undefined

Does this due to that CUDA dosn’t support virtual functions? I’m using CUDA Toolkit 3.1.

CUDA does not yet support virtual functions. See Appendix D of the CUDA Programming Guide for explanation of what C++ features are currently supported. Virtual function support should be coming (see the Fermi whitepaper), but it will likely require hardware features of compute capability 2.x devices.

CUDA does not yet support virtual functions. See Appendix D of the CUDA Programming Guide for explanation of what C++ features are currently supported. Virtual function support should be coming (see the Fermi whitepaper), but it will likely require hardware features of compute capability 2.x devices.

Thanks for your reply, seibert. It seems that I have to use a wrapper class instead…

Thanks for your reply, seibert. It seems that I have to use a wrapper class instead…

Function pointers are supported on fermi… so supporting virtual functions is not an issue for the hardware… it would just require a compiler update…

whether that comes or not is another issue…

Function pointers are supported on fermi… so supporting virtual functions is not an issue for the hardware… it would just require a compiler update…

whether that comes or not is another issue…

It seems the time has come. I can compile pure virtual functions on cuda4.0 and fermi card.

Just an update.