Running-min and running-max instructions for processing vectors using a base value from a key element of an input vector
First Claim
1. 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.
1 Assignment
0 Petitions
Accused Products
Abstract
The described embodiments provide a processor for generating a result vector that contains results from a comparison operation. During operation, the processor receives a first input vector, a second input vector, and a control vector. When subsequently generating a result vector, the processor first captures a base value from a key element position in the first input vector. For selected elements in the result vector, processor compares the base value and values from relevant elements to the left of a corresponding element in the second input vector, and writes the result into the element in the result vector. In the described embodiments, the key element position and the relevant elements can be defined by the control vector and an optional predicate vector.
410 Citations
24 Claims
-
1. 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. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
9. A processor for generating a result vector with results from a multi-way comparison operation, comprising:
-
at least one execution unit configured to; receive a first input vector, a second input vector, and a control vector, and optionally receive a predicate vector, wherein each vector includes a same number of elements; capture a base value contained in an element of the first input vector at a key element position; and generate the result vector, wherein when generating the result vector, 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, the at least one execution unit is configured to; set the element in the result vector equal to a result of the 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. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A computer system for generating a result vector with results from a multi-way comparison operation, comprising:
-
a processor; a memory coupled to the processor, wherein the memory stores data and instructions for the processor; at least one execution unit in the processor, wherein the at least one execution unit is configured to; receive a first input vector, a second input vector, and a control vector, and optionally receive a predicate vector, wherein each vector includes a same number of elements; capture a base value contained in an element of the first input vector at a key element position; and generate the result vector, wherein when generating the result vector, 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, the at least one execution unit is configured to; set the element in the result vector equal to a result of the 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. - View Dependent Claims (18, 19, 20, 21, 22, 23, 24)
-
Specification