I have an object with functions that I wrote in C++:
MyObj::MyObj(int I, int J) {// Ctor code goes here}int MyOjb:func1() {// simple function that returns an int}__global__ void KernelWork(int i, int j) {myObj = new MyObj(i, j);int result = myObj.func1();}
This is not allowed, I am getting this error:
Error identifier "MyObj::MyObj" is undefined in device
How do I make myObj object to be defined in the GPU?