title: cudaStreamSynchronize vs CudaDeviceSynchronize vs cudaThreadSynchronize
body: <p>What is the difference between these three functions, especially the last two? The library manual says</p>
  
  <blockquote>
    <p>Note that this function is deprecated because its name does not
    reflect its behavior. Its functionality is similar to the
    non-deprecated function cudaDeviceSynchronize(), which should be used
    instead.</p>
  </blockquote>
  
  <p>But not very sure what does it mean.</p>