hello guys… is inheritance possible on classes running on the gpu? This is what I am doing (an example of…):
class c1 {
public:
int a,b,c; device compute_something() {
a=…
b=…
c=…
}
};
class c2 : public c1 {
public:
float some,data,here; device some_other() {
}
};
global void doForAll(c2 *all) {
uint ix=threadIdx.x;
all[ix].compute_something();
}
…
…
…
…
as you see c2 inherits c1 and a device method of c1 is called. This is the error message:
error: calling a host function from a device/global function is only allowed in device emulation mode
well, c1 is not on the host… right? Why that message?