- Category:
- SCM
- Tags:
-
[C/C++]
[源码]
- File Size:
- 2kb
- Update:
- 2012-11-26
- Downloads:
- 0 Times
- Uploaded by:
- lium000
Description: Matrix multiplication with the Cannon Algorithm:
The Cannon Algorithm for matrix multiplication was presented in the course “Parallel and Distributed
Algorithms “by Dr. Klauck.
Short description:
The matrices A and B are stored in files. The file names have to be specified as parameter. The root
process reads the matrices and distributes the respective values to all processes, so that processor i, j
has the values ai,j and bi,j. Matrix C = A · B should be calculated as follows:
1. step: Shift values so that processor i, j has values ai,(i+j)mod
√
p and b(i+j)mod
√
p,j.
2. step: ci,j = ai,j · bi,j
3. step: Shift values of matrix A left (i → i − 1) and values of matrix B up (j → j − 1).
File list (Check if you may need any files):
cannon.c