title: Why variables in thread's block have the same memory address? Cuda
body: <p>I am wondering why they have the same memory address, when If I remember correctly, each thread has a own copy of created variable in this way:</p>
  <pre class="lang-cpp prettyprint-override"><code>__global__ void
  Matrix_Multiplication_Shared(
     const int* const Matrix_A, 
     const int* const Matrix_B, 
           int* const Matrix_C)
  {   
      const int sum_value = threadIdx.x;
      printf(&quot;%p \n&quot;, &amp;sum_value);
  }
  </code></pre>
  <p>Output:</p>
  <p><a href="https://i.stack.imgur.com/pGva1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pGva1.png" alt="enter image description here" /></a></p>
  <p>I am considering the case of one thread's block, for example with 2 and more threads.</p>