I’m new to CUDA but I have a problem and I didn’t find any solution.
I need to allocate and initialize 20 arrays on the device. I figured that I could allocate and initialize the arrays on the host and then copy them to the device, but it seems I will have to pass them to the kernel function.
Is there any way to initialize the arrays and make them available to the kernel without having to pass them? I need the arrays on the device only to do some calculations.
Sorry for my bad english, I hope you understand what I mean.
Edit: Forgot to add that I can’t simply define the arrays in a header file with a device prefix because those arrays are initialized at application startup in a loop.