just a general question that would greatly help me understand how to deal with derived classes and methods, in order to port existing C++ code to Cuda.
According to the programming guide you’re not allowed to pass an object with virtual functions as an argument to a global kernel. that is quite limiting in my case.
is there a way around this without creating the objects inside the kernel?
and would anyone know if that restriction is temporary pending future compiler releases?
much appreciation for any help!
in that thread a member suggests a way of doing it that seems to work. is that the best way?
yes i’ve been passing inherited objects to kernels and calling their functions without problem, but only if the functions are not virtual. if they are it doesnt work, which makes sense giving your explanation.
it just makes porting C++ code a little trickier, as in my case it’s all virtual functions.
if anyone has neat tricks to do that please do share.
Thanks again!