I know this has probably been asked a thousand times, but I can’t find good support on this…
What I’m trying to do is to have a normal c++ that works as the main class of my program, which basically controls the program flow. From here I want to call a .cu file containing a kernel.
I’ve seen some examples but none of them are working, even the cppIntegration example that comes with the sdk which, for some reason, I’m not able to compile…
The SDK examples should compile…that may indicate something is wrong with your setup if they don’t. I would suggest looking into that further and possibly giving more information…
Do you get errors when trying to compile cppIntegration example? What are they?
Now, is it possible to use c++ as a basis, I mean, given it’s support for data structures like vectors and that kind of stuff, and then call cuda kernels?
For instance, I have my main function in c++, where I go through a vector and, depending on the current element, I want to call some kernel. The problem I’m facing is about how to allocate device memory from c++…
Is this even possible? Or is there some workaround?
It seems that I cannot call a kernel from an external function…how come? I changed the cppIntegration example to print something inside the kernel and it’s not printing either…
To be honest, I have no idea what was my problem, but I just got it to work by compiling it “manually”, so it probably was something to do with the Makefile.