1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
int i, j;
int ii, jj;
for(jj=0; jj < dim; jj+=32)
for(ii=0; ii < dim; ii+=32)
for(j=jj; j < jj+32; j+=4)
for(i=ii; i < ii+32; i+=4) {
dst[RIDX(dim-1-j,i,dim)] = src[RIDX(i,j,dim)];
dst[RIDX(dim-1-j,i+1,dim)] = src[RIDX(i+1,j,dim)];
dst[RIDX(dim-1-j,i+2,dim)] = src[RIDX(i+2,j,dim)];
dst[RIDX(dim-1-j,i+3,dim)] = src[RIDX(i+3,j,dim)];
dst[RIDX(dim-1-j-1,i,dim)] = src[RIDX(i,j+1,dim)];
dst[RIDX(dim-1-j-1,i+1,dim)] = src[RIDX(i+1,j+1,dim)];
dst[RIDX(dim-1-j-1,i+2,dim)] = src[RIDX(i+2,j+1,dim)];
dst[RIDX(dim-1-j-1,i+3,dim)] = src[RIDX(i+3,j+1,dim)];
dst[RIDX(dim-1-j-2,i,dim)] = src[RIDX(i,j+2,dim)];
dst[RIDX(dim-1-j-2,i+1,dim)] = src[RIDX(i+1,j+2,dim)];
dst[RIDX(dim-1-j-2,i+2,dim)] = src[RIDX(i+2,j+2,dim)];
dst[RIDX(dim-1-j-2,i+3,dim)] = src[RIDX(i+3,j+2,dim)];
dst[RIDX(dim-1-j-3,i,dim)] = src[RIDX(i,j+3,dim)];
dst[RIDX(dim-1-j-3,i+1,dim)] = src[RIDX(i+1,j+3,dim)];
dst[RIDX(dim-1-j-3,i+2,dim)] = src[RIDX(i+2,j+3,dim)];
dst[RIDX(dim-1-j-3,i+3,dim)] = src[RIDX(i+3,j+3,dim)];
}
|