| 800 |
|
rm->ncols = dold.nrows; rm->nrows = dold.ncols; |
| 801 |
|
for (i = rm->nrows; i--; ) |
| 802 |
|
for (j = rm->ncols; j--; ) { |
| 803 |
< |
int i0, j0, i1 = i, j1 = j; |
| 803 |
> |
int i0, j0; |
| 804 |
> |
int i1 = i; |
| 805 |
> |
size_t j1 = j; |
| 806 |
|
if (!bmtestandset(i,j)) continue; |
| 807 |
|
memcpy(val, rmx_val(rm,i,j), |
| 808 |
|
sizeof(rmx_dtype)*rm->ncomp); |
| 809 |
|
for ( ; ; ) { /* value transpose loop */ |
| 810 |
|
const rmx_dtype *src; |
| 811 |
< |
i0 = i1; j0 = j1; |
| 811 |
> |
i0 = i1; j0 = (int)j1; |
| 812 |
|
src = rmx_val(&dold, j0, i0); |
| 813 |
< |
i1 = (src - dold.mtx)/(dold.ncomp*rm->ncols); |
| 814 |
< |
j1 = (src - dold.mtx)/dold.ncomp % rm->ncols; |
| 813 |
> |
j1 = (src - dold.mtx)/dold.ncomp; |
| 814 |
> |
i1 = j1 / rm->ncols; |
| 815 |
> |
j1 -= i1*rm->ncols; |
| 816 |
|
if (!bmtestandset(i1,j1)) break; |
| 817 |
|
memcpy(rmx_lval(rm,i0,j0), src, |
| 818 |
|
sizeof(rmx_dtype)*rm->ncomp); |