when we want to allocate memory on device we use following syntax:
float *device_array;
error = cudaMalloc((void *)&device_array,
sizeof(float) * N);
what is that "&" for? we dont use it in cudaMemCpy.
when we want to allocate memory on device we use following syntax:
float *device_array;
error = cudaMalloc((void *)&device_array,
sizeof(float) * N);
what is that "&" for? we dont use it in cudaMemCpy.