Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6402

How to use my Object in a CUDA global function

$
0
0

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?


Viewing all articles
Browse latest Browse all 6402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>