title: Behavior of streams created via cudaStreamCreate versus cudaStreamCreateWithFlags?
body: <p>I notice that <code>cudaStreamCreate</code> is a <code>__host__</code>-only function, but <code>cudaStreamCreateWithFlags</code> is a <code>__host__ __device__</code> function.</p>
  
  <p>Is there an important difference between the two that makes <code>cudaStreamCreate</code> unavailable in <code>__device__</code> functions?</p>
  
  <p>I see this <a href="http://docs.nvidia.com/cuda/cuda-runtime-api/index.html#ixzz47ej8skSe" rel="nofollow">documentation for the <code>cudaStreamCreateWithFlags</code> flags parameter</a>:</p>
  
  <blockquote>
    <p>Creates a new asynchronous stream. The flags argument determines the
    behaviors of the stream. Valid values for flags are</p>
    
    <ul>
    <li><code>cudaStreamDefault</code>: Default stream creation flag.</li>
    <li><code>cudaStreamNonBlocking</code>: Specifies that work running in the created
    stream may run concurrently with work in stream 0 (the NULL stream),
    and that the created stream should perform no implicit synchronization
    with stream 0.</li>
    </ul>
  </blockquote>
  
  <p>What precisely does "Default stream creation flag" mean? How will the created stream behave?</p>