Be careful while using "cudaMemcpyToSymbol" it can introduce bugs if you are trying to copy a struct from CPU to GPU.