I am relatively new to CUDA. I am trying to create an application in CUDA and would like to understand more about the memory allocation with CUDA.
As I was writing my program, I was wondering when I declare a simple variable like “int” or “double” in the kernel, does that variable reside in host or device memory?
When I pass a single variable (again “int” or “double”) as parameter to the kernel as a reference, will it run slow if I use the parameter alot within the kernel as I can imagine it will access the host memory every time I use it? Should I create a copy in kernel for performance?