Traditional (Textbook) algorithm is O(n3)
We have gotten it down to ≈O(n2.37)
alg. PInnerProduct. Use PSum
from Parallel Algorithmss. Calculates Inner Product of two vectors
- Span T∞(n)=O(logn)
- #processors p=O(lognn)
- Work: W∞(n)=O(n)
alg. Matrix Multiplication.
alg. Parallel Matrix Multiplication.
alg. Parallel Recursive Matrix Multiplication. A Divide-and-Conquer algorithm.
Idea:
C=(C11C21C12C22),A=(A11A21A12A22),B=(B11B21B12B22),
(C11C21C12C22)=(A11A21A12A22)(B11B21B12B22)=(A11B11+A12B21A21B11+A22B21A11B12+A12B22A21B12+A22B22)
- Span T∞(n)≤T∞(2n)+O(1)=O(logn)
- Work W∞(n)≤8⋅W∞(2n)+O(n2)=O(n3)