MCPcopy Create free account
hub / github.com/BoevaLab/FREEC / inplacetranspose

Function inplacetranspose

src/blas.cpp:184–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182
183
184void 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
215void copyandtranspose(const ap::real_2d_array& a,

Callers 1

rmatrixsvdFunction · 0.85

Calls 2

vmoveFunction · 0.85
getstrideMethod · 0.80

Tested by

no test coverage detected