LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ cblas_strsm()

void cblas_strsm ( CBLAS_LAYOUT  layout,
CBLAS_SIDE  Side,
CBLAS_UPLO  Uplo,
CBLAS_TRANSPOSE  TransA,
CBLAS_DIAG  Diag,
const CBLAS_INT  M,
const CBLAS_INT  N,
const float  alpha,
const float *  A,
const CBLAS_INT  lda,
float *  B,
const CBLAS_INT  ldb 
)

Definition at line 12 of file cblas_strsm.c.

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