28.10.2014 Views

Synergy User Manual and Tutorial. - THE CORE MEMORY

Synergy User Manual and Tutorial. - THE CORE MEMORY

Synergy User Manual and Tutorial. - THE CORE MEMORY

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.

<strong>Synergy</strong> <strong>User</strong> <strong>Manual</strong> <strong>and</strong> <strong>Tutorial</strong><br />

0 1 2 3 4 5 6 7 8 9<br />

0 1 1 1 1 1 1 1 1 1 1<br />

1 1 1 1 1 1 1 1 1 1 0<br />

2 1 1 1 1 1 1 1 1 0 0<br />

3 1 1 1 1 1 1 1 0 0 0<br />

A = 4 1 1 1 1 1 1 0 0 0 0 B =<br />

5 1 1 1 1 1 0 0 0 0 0<br />

6 1 1 1 1 0 0 0 0 0 0<br />

7 1 1 1 0 0 0 0 0 0 0<br />

8 1 1 0 0 0 0 0 0 0 0<br />

9 1 0 0 0 0 0 0 0 0 0<br />

0<br />

1<br />

2<br />

3<br />

4<br />

5<br />

6<br />

7<br />

8<br />

9<br />

0 1 2 3 4 5 6 7 8 9<br />

0 0 0 0 0 0 0 0 0 1<br />

0 0 0 0 0 0 0 0 1 -1<br />

0 0 0 0 0 0 0 1 -1 0<br />

0 0 0 0 0 0 1 -1 0 0<br />

0 0 0 0 0 1 -1 0 0 0<br />

0 0 0 0 1 -1 0 0 0 0<br />

0 0 0 1 -1 0 0 0 0 0<br />

0 0 1 -1 0 0 0 0 0 0<br />

0 1 -1 0 0 0 0 0 0 0<br />

1 -1 0 0 0 0 0 0 0 0<br />

C<br />

0<br />

1<br />

2<br />

3 0 0 0 1 0 0 0 0 0 0<br />

A . B C = 4 0 0 0 0 1 0 0 0 0 0 B A 1<br />

5<br />

6<br />

7<br />

8<br />

9<br />

0 1 2 3 4 5 6 7 8 9<br />

1 0 0 0 0 0 0 0 0 0<br />

0 1 0 0 0 0 0 0 0 0<br />

0 0 1 0 0 0 0 0 0 0<br />

0 0 0 0 0 1 0 0 0 0<br />

0 0 0 0 0 0 1 0 0 0<br />

0 0 0 0 0 0 0 1 0 0<br />

0 0 0 0 0 0 0 0 1 0<br />

0 0 0 0 0 0 0 0 0 1<br />

The following is the tuple space “matrix multiplication” master program implemented by<br />

sending work in chunks:<br />

#include <br />

#include <br />

#include <br />

#include "matrix.h"<br />

// The A matrix to break up into arrays<br />

// <strong>and</strong> send to workers<br />

double A[N][N];<br />

// The B matrix<br />

double B[N][N];<br />

// The resulting C matrix<br />

double C[N][N];<br />

172

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

Saved successfully!

Ooh no, something went wrong!