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

Function rmatrixlefttrsm

src/ablas.cpp:1078–1170  ·  view source on GitHub ↗

Same as CMatrixLeftTRSM, but for real matrices OpType may be only 0 or 1. -- ALGLIB routine -- 15.12.2009 Bochkanov Sergey *************************************************************************/

Source from the content-addressed store, hash-verified

1076 Bochkanov Sergey
1077*************************************************************************/
1078void rmatrixlefttrsm(int m,
1079 int n,
1080 const ap::real_2d_array& a,
1081 int i1,
1082 int j1,
1083 bool isupper,
1084 bool isunit,
1085 int optype,
1086 ap::real_2d_array& x,
1087 int i2,
1088 int j2)
1089{
1090 int s1;
1091 int s2;
1092 int bs;
1093
1094 bs = ablasblocksize(a);
1095 if( m<=bs&&n<=bs )
1096 {
1097 rmatrixlefttrsm2(m, n, a, i1, j1, isupper, isunit, optype, x, i2, j2);
1098 return;
1099 }
1100 if( n>=m )
1101 {
1102
1103 //
1104 // Split X: op(A)^-1*X = op(A)^-1*(X1 X2)
1105 //
1106 ablassplitlength(x, n, s1, s2);
1107 rmatrixlefttrsm(m, s1, a, i1, j1, isupper, isunit, optype, x, i2, j2);
1108 rmatrixlefttrsm(m, s2, a, i1, j1, isupper, isunit, optype, x, i2, j2+s1);
1109 }
1110 else
1111 {
1112
1113 //
1114 // Split A
1115 //
1116 ablassplitlength(a, m, s1, s2);
1117 if( isupper&&optype==0 )
1118 {
1119
1120 //
1121 // (A1 A12)-1 ( X1 )
1122 // A^-1*X* = ( ) *( )
1123 // ( A2) ( X2 )
1124 //
1125 rmatrixlefttrsm(s2, n, a, i1+s1, j1+s1, isupper, isunit, optype, x, i2+s1, j2);
1126 rmatrixgemm(s1, n, s2, -1.0, a, i1, j1+s1, 0, x, i2+s1, j2, 0, 1.0, x, i2, j2);
1127 rmatrixlefttrsm(s1, n, a, i1, j1, isupper, isunit, optype, x, i2, j2);
1128 return;
1129 }
1130 if( isupper&&optype!=0 )
1131 {
1132
1133 //
1134 // (A1' )-1 ( X1 )
1135 // A^-1*X = ( ) *( )

Callers

nothing calls this directly

Calls 4

ablasblocksizeFunction · 0.85
rmatrixlefttrsm2Function · 0.85
ablassplitlengthFunction · 0.85
rmatrixgemmFunction · 0.85

Tested by

no test coverage detected