cudaThreadSynchronize is deprecated