22.02.2014 Views

Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet

Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet

Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

portable Level 3 BLAS Winograd variant <strong>of</strong> Strassen's matrix-matrix multiply<br />

algorithm, Journal <strong>of</strong> Computational Physics, 110 (1994), pp. 1-10 for an<br />

answer).<br />

The 22 steps are the following:<br />

Step W mk C 11 C 12 C 21 C 22 W kn Operation<br />

1 S 7 B 22 4B 12<br />

2 S 3 A 11 4A 21<br />

3 M 4 S 3 S 7<br />

4 S 1 A 21 +A 22<br />

5 S 5 B 12 4B 11<br />

6 M 5 S 1 S 5<br />

7 S 6 B 22 4S 5<br />

8 S 2 S 1 4A 11<br />

9 M 1 S 2 S 6<br />

10 S 4 A 12 4S 2<br />

143<br />

Step W mk C 11 C 12 C 21 C 22 W kn Operation<br />

11 M 6 S 4 B 22<br />

12 T 3 M 5 +M 6<br />

13 M 2 A 11 B 11<br />

14 T 1 M 1 +M 2<br />

15 C 12 T 1 +T 3<br />

16 T 2 T 1 +M 4<br />

17 S 8 S 6 4B 21<br />

18 M 7 A 22 S 8<br />

19 C 21 T 2 4M 7<br />

20 C 22 T 2 +M 5<br />

21 M 3 A 12 B 21<br />

22 C 11 M 2 +M 3<br />

There are four tricky steps in the table above, depending on whether or not k is<br />

even or odd. Each step makes certain that we do not use more memory than is<br />

allocated for a submatrix or temporary. For example,<br />

144

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!