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

Function rmatrixlefttrsm2

src/ablas.cpp:2259–2406  ·  view source on GitHub ↗

Level 2 subroutine *************************************************************************/

Source from the content-addressed store, hash-verified

2257Level 2 subroutine
2258*************************************************************************/
2259static void rmatrixlefttrsm2(int m,
2260 int n,
2261 const ap::real_2d_array& a,
2262 int i1,
2263 int j1,
2264 bool isupper,
2265 bool isunit,
2266 int optype,
2267 ap::real_2d_array& x,
2268 int i2,
2269 int j2)
2270{
2271 int i;
2272 int j;
2273 double vr;
2274 double vd;
2275
2276
2277 //
2278 // Special case
2279 //
2280 if( n*m==0 )
2281 {
2282 return;
2283 }
2284
2285 //
2286 // Try fast code
2287 //
2288 if( rmatrixlefttrsmf(m, n, a, i1, j1, isupper, isunit, optype, x, i2, j2) )
2289 {
2290 return;
2291 }
2292
2293 //
2294 // General case
2295 //
2296 if( isupper )
2297 {
2298
2299 //
2300 // Upper triangular matrix
2301 //
2302 if( optype==0 )
2303 {
2304
2305 //
2306 // A^(-1)*X
2307 //
2308 for(i = m-1; i >= 0; i--)
2309 {
2310 for(j = i+1; j <= m-1; j++)
2311 {
2312 vr = a(i1+i,j1+j);
2313 ap::vsub(&x(i2+i, j2), 1, &x(i2+j, j2), 1, ap::vlen(j2,j2+n-1), vr);
2314 }
2315 if( !isunit )
2316 {

Callers 1

rmatrixlefttrsmFunction · 0.85

Calls 3

rmatrixlefttrsmfFunction · 0.85
vsubFunction · 0.85
vmulFunction · 0.85

Tested by

no test coverage detected