4 Replies Latest reply on Jul 16, 2009 2:24 AM by genaganna

    short vectors - shifting across word boundaries?


      I have some code where I would like to perform a circular shift of the contents of an int4 by one word.  Can this be done with some sort of shift operator, or something that is more efficient than 5 assignments?

      int4 a; int4 b; b.x = a.x; a.x = a.y; a.y = a.z; a.z = a.w; a.w = b.x;