title: How to allocate cuda half-precision arrays correctly?
body: <p>I am confused about the correct way to define <code>half</code> - precision data allocation on the device. If for example i wish to have an array of <code>half</code> in device memory, should it be allocated as such?</p>
  
  <pre><code>__device__ half array[32];
  </code></pre>
  
  <p>or will this net the same actual device memory usage as an array of <code>float</code> because each <code>half</code> is stored with unused bits before it? (like how a <code>bool</code> has to occupy an entire memmory address, not just 1 bit) Is the correct way to allocate as following?</p>
  
  <pre><code>__device__ half2 array[16];
  </code></pre>
  
  <p>if both net the same amount of bytes allocated, what is the point of <code>half2</code> ? </p>