Hello guys, I’m trying to right some code that should be working in CUDA. Since I’ve got a recursive kernel, and I’ve created my structure with my own objects ( Piece.cpp ) I pass one of the objects to the kernel itself, like this:
parallelKernel (Piece* piece, vector upcomingPieces)
When I need to get the recursive call, I build up the next piece index, so I wrote something like this:
Piece *nextPiece = upcomingPieces[nextPieceIndex];
parallelKernel (nextPiece, upcomingPieces);
but I get an error at compile-time:
error: cannot pass an argument with a user-provided copy-constructor to a device-side kernel launch
What am I supposed to do?? Is it possible to just add host device prefix to the Piece constructor, in a .cpp file??