I know that this question has probably been asked, but I can't find an answer that particularly answers my question so here it goes...
The question is pretty simple, I am trying to use a C++ style header for CUDA (.cu/.cuh) code.
//MyClass.cuh
#ifndef MY_CLASS
#define MY_CLASS
#include ...cuda.h, etc.
class MyClass
{
public:
void myFunction();
private:
__global__ void myKernel();
}
#endif
//MyClass.cu
#include "MyClass.cuh"
void MyClass::myFunction()
{
//myFunction definition...
}
__global__ void MyClass::myKernel()
{
//myKernel definition...
}
Will this work?