Patent ID: 8417921

Claim:
A method for generating a result vector with results of a multi-way comparison operation, comprising: in a processor, performing operations for: receiving a first input vector, a second input vector, and a control vector, and optionally receiving a predicate vector, wherein each vector includes a same number of elements; capturing a base value contained in an element of the first input vector at a key element position; 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 the key element position for which a corresponding element in the predicate vector is active, otherwise, for each element in the result vector to the right of the key element position, setting the element in the result vector equal to a result of a multi-way comparison operation for which the inputs are the base value and a value in each relevant element of the second input vector from an element at the key element position to and including a predetermined element in the second input vector, wherein a relevant element in the second input vector is an element in the second input vector for which a corresponding element in the control vector is active.