Method for performing box filter
First Claim
1. In a computer system, a method for filtering an array of data, the method comprising the steps of:
- a) filtering rows of an array, wherein the rows are in packed data sequences with each sequence having a plurality of packed data elements, by performing the following steps for each row;
a1) generating copies of a row of the array;
a2) aligning the copies;
a3) generating a sum of the copies, wherein corresponding packed elements of two copies are simultaneously added in response to executing a first instruction; and
b) filtering columns of the array by sequentially adding, in response to executing the first instruction, filtered rows to a preceding and succeeding filtered row.
1 Assignment
0 Petitions
Accused Products
Abstract
A computer implemented method for box filtering an array of data. The method includes a first step of filtering the rows of an array. The rows are in packed data sequences, each sequence having a plurality of packed data elements. Each row is filtered by generating copies of the row, aligning the copies, and generating a sum of the copies. The sum is generated by simultaneously adding corresponding packed elements of two rows in response to executing a first instruction. The columns of the array are filtered by sequentially adding, in response to executing the first instruction, filtered rows to a preceding and succeeding filtered row.
21 Citations
15 Claims
-
1. In a computer system, a method for filtering an array of data, the method comprising the steps of:
-
a) filtering rows of an array, wherein the rows are in packed data sequences with each sequence having a plurality of packed data elements, by performing the following steps for each row; a1) generating copies of a row of the array; a2) aligning the copies; a3) generating a sum of the copies, wherein corresponding packed elements of two copies are simultaneously added in response to executing a first instruction; and b) filtering columns of the array by sequentially adding, in response to executing the first instruction, filtered rows to a preceding and succeeding filtered row. - View Dependent Claims (2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15)
-
-
8. In a computer system a method for filtering of an array of data, the method comprising the steps of:
-
a) filtering rows by performing the following steps for each row; a1) unpacking, in response to executing a PUNPCK instruction, four high packed-bytes of a row into four packed words of a first packed data sequence; a2) unpacking, in response to executing a PUNPCK instruction, four low packed-bytes of the row into four packed words of a second packed data sequence; a3) generating, in response to executing MOVQ instructions, copies of the row of the array; a4) shifting right, in response to executing a PSRL instruction, by at least one data element, a number of copies equal to a first coefficient of a row filter; a5) shifting left, in response to executing a PSLL, by at least one data element, a number of copies equal to a second coefficient of the row filter, wherein a number of the copies unshifted is equal to a third coefficient of the row filter; a6) generating a sum of the copies, wherein corresponding packed elements of two copies are simultaneously added in response to executing a first instruction; and b) filtering columns of the array by performing the following steps for each filtered row, excluding a first and last filtered row; b1) generating a sum, in response to executing a PADD instruction, by adding, X times, corresponding packed elements of filtered rowi-1 and rowi, where X represents a first coefficient of a column filter, and i represents an integer; b2) adding, Y times, in response to executing a PADD instruction, filtered rowi to the sum, where Y represents a second coefficient of the column filter b3) adding, Z times, in response to executing a PADD instruction, rowi+1 to the sum, where Z represents a third coefficient of the column filter.
-
-
9. A machine-readable medium having stored thereon data representing a sequence of instructions for filtering an array of data, the sequence of instructions which, when executed by a processor, cause the processor to perform the steps of:
-
a) filtering rows of an array, wherein the rows are in packed data sequences with each sequence having a plurality of packed data elements, by performing the following steps for each row; a1) generating copies of a row of the array; a2) aligning the copies; a3) generating a sum of the copies, wherein corresponding packed elements of two copies are simultaneously added in response to executing a first instruction; and b) filtering columns of the array by sequentially adding, in response to executing the first instruction, filtered rows to a preceding and succeeding filtered row.
-
Specification