I am running experiments to test the time difference between a CPU run and a GPU run. Although i have a separate piece of code written for the CPU, i actually want to test it using the same code if possible. I got to know from someone
that we can use the same .cu file code to execute on the CPU. We just need to change a flag while compiling with nvcc. Is that correct? I tried looking for it in the NVCC guide but did not find any thing in particular.
However the nvcc -c option converts an x.cu file to an x.cu.c file. Does this new .c file now execute on the host?
Can someone plz expalin the use of -c and also give me a solution if this is not it?