LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
void cblas_ctrsm ( const CBLAS_LAYOUT  layout,
const CBLAS_SIDE  Side,
const CBLAS_UPLO  Uplo,
const CBLAS_TRANSPOSE  TransA,
const CBLAS_DIAG  Diag,
const int  M,
const int  N,
const void *  alpha,
const void *  A,
const int  lda,
void *  B,
const int  ldb 
)

Definition at line 12 of file cblas_ctrsm.c.

17 {
18  char UL, TA, SD, DI;
19 #ifdef F77_CHAR
20  F77_CHAR F77_TA, F77_UL, F77_SD, F77_DI;
21 #else
22  #define F77_TA &TA
23  #define F77_UL &UL
24  #define F77_SD &SD
25  #define F77_DI &DI
26 #endif
27 
28 #ifdef F77_INT
29  F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_ldb=ldb;
30 #else
31  #define F77_M M
32  #define F77_N N
33  #define F77_lda lda
34  #define F77_ldb ldb
35 #endif
36 
37  extern int CBLAS_CallFromC;
38  extern int RowMajorStrg;
39  RowMajorStrg = 0;
40  CBLAS_CallFromC = 1;
41 
42  if( layout == CblasColMajor )
43  {
44 
45  if( Side == CblasRight) SD='R';
46  else if ( Side == CblasLeft ) SD='L';
47  else
48  {
49  cblas_xerbla(2, "cblas_ctrsm", "Illegal Side setting, %d\n", Side);
50  CBLAS_CallFromC = 0;
51  RowMajorStrg = 0;
52  return;
53  }
54 
55  if( Uplo == CblasUpper) UL='U';
56  else if ( Uplo == CblasLower ) UL='L';
57  else
58  {
59  cblas_xerbla(3, "cblas_ctrsm", "Illegal Uplo setting, %d\n", Uplo);
60  CBLAS_CallFromC = 0;
61  RowMajorStrg = 0;
62  return;
63  }
64 
65  if( TransA == CblasTrans) TA ='T';
66  else if ( TransA == CblasConjTrans ) TA='C';
67  else if ( TransA == CblasNoTrans ) TA='N';
68  else
69  {
70  cblas_xerbla(4, "cblas_ctrsm", "Illegal Trans setting, %d\n", TransA);
71  CBLAS_CallFromC = 0;
72  RowMajorStrg = 0;
73  return;
74  }
75 
76  if( Diag == CblasUnit ) DI='U';
77  else if ( Diag == CblasNonUnit ) DI='N';
78  else
79  {
80  cblas_xerbla(5, "cblas_ctrsm", "Illegal Diag setting, %d\n", Diag);
81  CBLAS_CallFromC = 0;
82  RowMajorStrg = 0;
83  return;
84  }
85 
86  #ifdef F77_CHAR
87  F77_UL = C2F_CHAR(&UL);
88  F77_TA = C2F_CHAR(&TA);
89  F77_SD = C2F_CHAR(&SD);
90  F77_DI = C2F_CHAR(&DI);
91  #endif
92 
93  F77_ctrsm(F77_SD, F77_UL, F77_TA, F77_DI, &F77_M, &F77_N, alpha, A,
94  &F77_lda, B, &F77_ldb);
95  } else if (layout == CblasRowMajor)
96  {
97  RowMajorStrg = 1;
98 
99  if( Side == CblasRight) SD='L';
100  else if ( Side == CblasLeft ) SD='R';
101  else
102  {
103  cblas_xerbla(2, "cblas_ctrsm", "Illegal Side setting, %d\n", Side);
104  CBLAS_CallFromC = 0;
105  RowMajorStrg = 0;
106  return;
107  }
108 
109  if( Uplo == CblasUpper) UL='L';
110  else if ( Uplo == CblasLower ) UL='U';
111  else
112  {
113  cblas_xerbla(3, "cblas_ctrsm", "Illegal Uplo setting, %d\n", Uplo);
114  CBLAS_CallFromC = 0;
115  RowMajorStrg = 0;
116  return;
117  }
118 
119  if( TransA == CblasTrans) TA ='T';
120  else if ( TransA == CblasConjTrans ) TA='C';
121  else if ( TransA == CblasNoTrans ) TA='N';
122  else
123  {
124  cblas_xerbla(4, "cblas_ctrsm", "Illegal Trans setting, %d\n", TransA);
125  CBLAS_CallFromC = 0;
126  RowMajorStrg = 0;
127  return;
128  }
129 
130  if( Diag == CblasUnit ) DI='U';
131  else if ( Diag == CblasNonUnit ) DI='N';
132  else
133  {
134  cblas_xerbla(5, "cblas_ctrsm", "Illegal Diag setting, %d\n", Diag);
135  CBLAS_CallFromC = 0;
136  RowMajorStrg = 0;
137  return;
138  }
139 
140  #ifdef F77_CHAR
141  F77_UL = C2F_CHAR(&UL);
142  F77_TA = C2F_CHAR(&TA);
143  F77_SD = C2F_CHAR(&SD);
144  F77_DI = C2F_CHAR(&DI);
145  #endif
146 
147 
148  F77_ctrsm(F77_SD, F77_UL, F77_TA, F77_DI, &F77_N, &F77_M, alpha, A,
149  &F77_lda, B, &F77_ldb);
150  }
151  else cblas_xerbla(1, "cblas_ctrsm", "Illegal layout setting, %d\n", layout);
152  CBLAS_CallFromC = 0;
153  RowMajorStrg = 0;
154  return;
155 }
int RowMajorStrg
Definition: cblas_globals.c:2
#define F77_TA
#define F77_SD
#define F77_ctrsm
Definition: cblas_f77.h:184
#define F77_lda
#define F77_M
#define F77_UL
#define F77_DI
int CBLAS_CallFromC
Definition: cblas_globals.c:1
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_N
#define F77_ldb
#define N
Definition: example_user.c:10

Here is the call graph for this function:

Here is the caller graph for this function: