root / synthbench / euroben-ports / base / C-MPI / mod2f / .svn / text-base / d2to1.c.svn-base @ 0:839f52ef7657
History | View | Annotate | Download (450 Bytes)
1 |
void d2to1( int m, int n, double **a, double *b ) |
---|---|
2 |
// --------------------------------------------------------------------- |
3 |
// --- 'd2to1' linearizes a 2-D array a[m][n] --> b[m*n]. |
4 |
// --------------------------------------------------------------------- |
5 |
{ |
6 |
int i, j; |
7 |
// --------------------------------------------------------------------- |
8 |
for( i = 0; i < m; i++ ) { |
9 |
for( j = 0; j < n; j++ ) { |
10 |
b[i*n+j] = a[i][j]; |
11 |
} |
12 |
} |
13 |
} |