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

Function cmatrixlefttrsm2

src/ablas.cpp:1889–2086  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1887Level-2 subroutine
1888*************************************************************************/
1889static void cmatrixlefttrsm2(int m,
1890 int n,
1891 const ap::complex_2d_array& a,
1892 int i1,
1893 int j1,
1894 bool isupper,
1895 bool isunit,
1896 int optype,
1897 ap::complex_2d_array& x,
1898 int i2,
1899 int j2)
1900{
1901 int i;
1902 int j;
1903 ap::complex vc;
1904 ap::complex vd;
1905
1906
1907 //
1908 // Special case
1909 //
1910 if( n*m==0 )
1911 {
1912 return;
1913 }
1914
1915 //
1916 // Try to call fast TRSM
1917 //
1918 if( cmatrixlefttrsmf(m, n, a, i1, j1, isupper, isunit, optype, x, i2, j2) )
1919 {
1920 return;
1921 }
1922
1923 //
1924 // General case
1925 //
1926 if( isupper )
1927 {
1928
1929 //
1930 // Upper triangular matrix
1931 //
1932 if( optype==0 )
1933 {
1934
1935 //
1936 // A^(-1)*X
1937 //
1938 for(i = m-1; i >= 0; i--)
1939 {
1940 for(j = i+1; j <= m-1; j++)
1941 {
1942 vc = a(i1+i,j1+j);
1943 ap::vsub(&x(i2+i, j2), 1, &x(i2+j, j2), 1, "N", ap::vlen(j2,j2+n-1), vc);
1944 }
1945 if( !isunit )
1946 {

Callers 1

cmatrixlefttrsmFunction · 0.85

Calls 3

cmatrixlefttrsmfFunction · 0.85
vsubFunction · 0.85
vmulFunction · 0.85

Tested by

no test coverage detected