| 182 | |
| 183 | |
| 184 | void inplacetranspose(ap::real_2d_array& a, |
| 185 | int i1, |
| 186 | int i2, |
| 187 | int j1, |
| 188 | int j2, |
| 189 | ap::real_1d_array& work) |
| 190 | { |
| 191 | int i; |
| 192 | int j; |
| 193 | int ips; |
| 194 | int jps; |
| 195 | int l; |
| 196 | |
| 197 | if( i1>i2||j1>j2 ) |
| 198 | { |
| 199 | return; |
| 200 | } |
| 201 | ap::ap_error::make_assertion(i1-i2==j1-j2, "InplaceTranspose error: incorrect array size!"); |
| 202 | for(i = i1; i <= i2-1; i++) |
| 203 | { |
| 204 | j = j1+i-i1; |
| 205 | ips = i+1; |
| 206 | jps = j1+ips-i1; |
| 207 | l = i2-i; |
| 208 | ap::vmove(&work(1), 1, &a(ips, j), a.getstride(), ap::vlen(1,l)); |
| 209 | ap::vmove(&a(ips, j), a.getstride(), &a(i, jps), 1, ap::vlen(ips,i2)); |
| 210 | ap::vmove(&a(i, jps), 1, &work(1), 1, ap::vlen(jps,j2)); |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | |
| 215 | void copyandtranspose(const ap::real_2d_array& a, |
no test coverage detected