Patent ID: 8356164

Claim:
A method for generating a result vector with shifted values from an input vector, comprising: receiving the input vector and a control vector, and optionally receiving a predicate vector, wherein each vector includes N elements; and generating the result vector, wherein generating the result vector involves, if the predicate vector is received, for each element in the result vector to the right of a key element position for which a corresponding element in the predicate vector contains a non-zero value, otherwise, for each element in the result vector to the right of the key element position: if an element at a first element position in the control vector to the left of the element in the result vector contains a non-zero value, setting the element in the result vector equal to a value contained in an element at the first element position in the input vector to the left of the element in the result vector; otherwise, if the element at the first element position in the control vector to the left of the element in the result vector contains a zero, setting the element in the result vector equal to a value from a rightmost element of the input vector to the left of the element of the result vector where a corresponding element of the control vector contains a non-zero value.