title: How to sort an array of CUDA vector types
body: <p>Specifically how could I sort an array of <code>float3</code>? Such that the <code>.x</code> components are the primary sort criteria, the <code>.y</code> components are the secondary sort criteria and the <code>.z</code> components are the tertiary sort criteria.</p>
  
  <p>Is there a simple solution that can make a single call to <code>cub:: DeviceRadixSort</code> or <code>thrust::sort_by_key</code>?</p>
  
  <p>At the moment I am thinking maybe I could create a <code>uint32</code> key array where the each element has the first third of its digits taken from the first third of the input array's <code>.x</code> components, the second third of digits taken from the first third of the input array's <code>.y</code> components, and the final third of its digits taken from the first third of the input array's <code>.z</code> components. Or is there a better solution?  </p>