Added cudaDeviceReset call