4 Replies Latest reply on Aug 31, 2012 6:15 PM by MicahVillmow

    OpenCL Vector Element Shift

    registerme

      Is there a way to shif the elements in a vector. Say I have int4, want to shift 4 element to the right for one position, with the left most one 0. So if int4={1,2,3,4}, the result is {0,1,2,3}.

       

      The reason I am doing this is, I want to do a vector add (or other operation), but the elements need to be shifted.