title: What's a good alternative to uint8_t when it is not provided by the compiler?
body: <p>I'm using nvcc to compile a CUDA kernel. Unfortunately, nvcc doesn't seem to support <code>uint8_t</code>, although it does support <code>int8_t</code> (!). I'd just as soon not use <code>unsigned char</code>, for portability, readability, and sanity reasons. Is there another good alternative?</p>
  
  <hr>
  
  <p>Just to forestall any possible misunderstanding, here are some details. </p>
  
  <pre><code>$ nvcc --version
  nvcc: NVIDIA (R) Cuda compiler driver
  Copyright (c) 2005-2010 NVIDIA Corporation
  Built on Mon_Jun__7_18:56:31_PDT_2010
  Cuda compilation tools, release 3.1, V0.2.1221
  </code></pre>
  
  <p>Code containing</p>
  
  <pre><code>int8_t test = 0;
  </code></pre>
  
  <p>is fine, but code containing</p>
  
  <pre><code>uint8_t test = 0;
  </code></pre>
  
  <p>throws an error message like</p>
  
  <pre><code>test.cu(8): error: identifier "uint8_t" is undefined
  </code></pre>