×

Method and system for fast 90 degree rotation of arrays

  • US 7,511,722 B1
  • Filed: 08/27/2004
  • Issued: 03/31/2009
  • Est. Priority Date: 08/27/2004
  • Status: Active Grant
First Claim
Patent Images

1. A computer-implemented method to rotate a 2N by 2N array in the counter-clockwise direction, the computer-implemented method comprising:

  • loading 2N elements of each row of the array into vector registers of a SIMD unit;

    interleaving the 2N elements of each row in the top half of the array with the 2N elements of a corresponding row in the bottom half of the array so that each element from the top half of the array precedes an element from a corresponding row in the bottom half of the array;

    storing the results of the interleaving operation in vector registers;

    repeating said loading and interleaving operations a total of N times, wherein a result of said loading and said interleaving is stored for further processing; and

    after N loading and N interleaving operations, writing the vector registers storing the results of the N loading and N interleaving operations to memory in order so that the elements representing the top row of the rotated array precede the elements representing each successive row of the array, the last 2N elements written to memory representing the bottom row of the rotated array.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×