Two sided Matrix Algorithms

# This recursive splitting results in the following

This preview shows pages 5–7. Sign up to view the full content.

This recursive splitting results in the following four triangular generalized Sylvester equations: A 11 X 11 B T 11 - C 11 X 11 D T 11 = E 11 - A 12 X 21 B T 11 - ( A 11 X 12 + A 12 X 22 ) B T 12 + C 12 X 21 D T 11 + ( C 11 X 12 + C 12 X 22 ) D T 12 , A 11 X 12 B T 22 - C 11 X 12 D T 22 = E 12 - A 12 X 22 B T 22 + C 12 X 22 D T 22 , A 22 X 21 B T 11 - C 22 X 21 D T 11 = E 21 - A 22 X 22 B T 12 + C 22 X 22 D T 12 , A 22 X 22 B T 22 - C 22 X 22 D T 22 = E 22 . We start by solving for X 22 in the fourth equation. After updating E 12 and E 21 with respect to X 22 , we can solve for X 12 and X 21 . Both updates and the triangular generalized Sylvester solves are independent operations and can be executed concurrently. Finally, after updating E 11 with respect to X 12 , X 21 , and X 22 , we solve for X 11 . Some of the updates of E 11 can be combined in larger GEMM operations. We obtain E 11 = E 11 - A 12 X 21 B T 11 + C 12 X 21 D T 11 - [ A 11 A 12 ] X 12 X 22 ‚¶ B T 12 + [ C 11 C 12 ] X 12 X 22 ‚¶ D T 12 . Alternatively, the update of E 11 can be performed as E 11 = E 11 - A 11 X 12 B T 12 + C 11 X 12 D T 12 - A 12 ([ X 21 X 22 ][ B 11 B 12 ]) T + C 12 [ X 21 X 22 ] D 11 D 12 ‚¶ T . ACM Transactions on Mathematical Software, Vol. 28, No. 4, December 2002.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Recursive Blocked Algorithms—Part II 421 Algorithm 1: rtrgsyl Input: ( A , C ) ( M × M ) and ( B , D ) ( N × N ) in upper generalized Schur form. E ( M × N ) dense matrix. blks , block size that specifies when to switch to a standard algorithm for solving small-sized triangular generalized Sylvester equations. Output: X ( M × N ), the solution of AXB T - CXD T = E . X is allowed to overwrite E . function [ X ] = rtrgsyl ( A , B , C , D , E , uplo , blks ) if 1 M , N blks then X = trgsyl ( A , B , C , D , E , uplo ); else switch uplo case 1 if 1 N M / 2 % Case 1: Split ( A , C ) (by rows and columns), E (by rows only) X 2 = rtrgsyl ( A 22 , B , C 22 , D , E 2 , uplo , blks ); E 1 = axb ( - A 12 , X 2 , B T , E 1 ); E 1 = axb ( C 12 , X 2 , D T , E 1 ); X 1 = rtrgsyl ( A 11 , B , C 11 , D , E 1 , uplo , blks ); X = [ X 1 ; X 2 ]; elseif 1 M N / 2 % Case 2: Split ( B , D ) (by rows and columns), E (by columns only) X 2 = rtrgsyl ( A , B 22 , C , D 22 , E 2 , uplo , blks ); E 1 = axb ( - A , X 2 , B T 12 , E 1 ); E 1 = axb ( C , X 2 , D T 12 , E 1 ); X 1 = rtrgsyl ( A , B 11 , C , D 11 , E 1 , uplo , blks ); X = [ X 1 , X 2 ]; else % M , N > blks Case 3: Split ( A , C ), ( B , D ) and E (all by rows and columns) X 22 = rtrgsyl ( A 22 , B 22 , C 22 , D 22 , E 22 , uplo , blks ); E 12 = axb ( - A 12 , X 22 , B T 22 , E 12 ); E 12 = axb ( C 12 , X 22 , D T 22 , E 12 ); E 21 = axb ( - A 22 , X 22 , B T 12 , E 21 ); E 21 = axb ( C 22 , X 22 , D T 12 , E 21 ); X 12 = rtrgsyl ( A 11 , B 22 , C 11 , D 22 , E 12 , uplo , blks ); X 21 = rtrgsyl ( A 22 , B 11 , C 22 , D 11 , E 21 , uplo , blks ); if M < N then E 11 = axb ( - A 11 , X 12 , B T 12 , E 11 ); E 11 = axb ( C 11 , X 12 , D T 12 , E 11 ); E 11 = axb ( - A 12 , [ X 21 X 22 ], [ B 11 B 12 ] T , E 11 ); E 11 = axb ( C 12 , [ X 21 X 22 ], [ D 11 D 12 ] T , E 11 ); else E 11 = axb ( - A 12 , X 21 , B T 11 , E 11 ); E 11 = axb ( C 12 , X 21 , D T 11 , E 11 ); E 11 = axb ( - [ A 11 A 12 ], £ X T 12 X T 22 / T , B T 12 , E 11 ); E 11 = axb ([ C 11 C 12 ], £ X T 12 X T 22 / T , D T 12 , E 11 ); end X 11 = rtrgsyl ( A 11 , B 11 , C 11 , D 11 , E 11 , uplo , blks ); X = [ X 11 , X 12 ; X 21 , X 22 ]; end case 2 % Code for uplo = 2. case 3 % Code for uplo = 3. case 4 % Code for uplo = 4. end Algorithm 1. Recursive blocked algorithm for solving the triangular generalized Sylvester equation.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern