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

Function cmatrixlqunpackq

src/ortfac.cpp:1191–1308  ·  view source on GitHub ↗

Partial unpacking of matrix Q from LQ decomposition of a complex matrix A. Input parameters: A - matrices Q and R in compact form. Output of CMatrixLQ subroutine . M - number of rows in matrix A. M>=0. N - number of columns in matrix A. N>=0. Tau - scalar factors which are used to form Q. Output

Source from the content-addressed store, hash-verified

1189 Bochkanov Sergey
1190*************************************************************************/
1191void cmatrixlqunpackq(const ap::complex_2d_array& a,
1192 int m,
1193 int n,
1194 const ap::complex_1d_array& tau,
1195 int qrows,
1196 ap::complex_2d_array& q)
1197{
1198 ap::complex_1d_array work;
1199 ap::complex_1d_array t;
1200 ap::complex_1d_array taubuf;
1201 int minmn;
1202 int refcnt;
1203 ap::complex_2d_array tmpa;
1204 ap::complex_2d_array tmpt;
1205 ap::complex_2d_array tmpr;
1206 int blockstart;
1207 int blocksize;
1208 int columnscount;
1209 int i;
1210 int j;
1211// int k;
1212 ap::complex v;
1213
1214 if( m<=0||n<=0 )
1215 {
1216 return;
1217 }
1218
1219 //
1220 // Init
1221 //
1222 minmn = ap::minint(m, n);
1223 refcnt = ap::minint(minmn, qrows);
1224 work.setlength(ap::maxint(m, n)+1);
1225 t.setlength(ap::maxint(m, n)+1);
1226 taubuf.setlength(minmn);
1227 tmpa.setlength(ablascomplexblocksize(a), n);
1228 tmpt.setlength(ablascomplexblocksize(a), ablascomplexblocksize(a));
1229 tmpr.setlength(qrows, 2*ablascomplexblocksize(a));
1230 q.setlength(qrows, n);
1231 for(i = 0; i <= qrows-1; i++)
1232 {
1233 for(j = 0; j <= n-1; j++)
1234 {
1235 if( i==j )
1236 {
1237 q(i,j) = 1;
1238 }
1239 else
1240 {
1241 q(i,j) = 0;
1242 }
1243 }
1244 }
1245
1246 //
1247 // Blocked code
1248 //

Callers

nothing calls this directly

Calls 7

ablascomplexblocksizeFunction · 0.85
cmatrixcopyFunction · 0.85
vmoveFunction · 0.85
cmatrixblockreflectorFunction · 0.85
cmatrixgemmFunction · 0.85
setlengthMethod · 0.45

Tested by

no test coverage detected