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

◆ cblas_cgemmtr()

void API_SUFFIX cblas_cgemmtr ( const CBLAS_LAYOUT layout,
const CBLAS_UPLO Uplo,
const CBLAS_TRANSPOSE TransA,
const CBLAS_TRANSPOSE TransB,
const CBLAS_INT N,
const CBLAS_INT K,
const void * alpha,
const void * A,
const CBLAS_INT lda,
const void * B,
const CBLAS_INT ldb,
const void * beta,
void * C,
const CBLAS_INT ldc )

Definition at line 12 of file cblas_cgemmtr.c.

17{
18 char TA, TB;
19 char UL;
20#ifdef F77_CHAR
21 F77_CHAR F77_TA, F77_TB, F77_UL;
22#else
23#define F77_TA &TA
24#define F77_TB &TB
25#define F77_UL &UL
26#endif
27
28#ifdef F77_INT
29 F77_INT F77_N=N, F77_K=K, F77_lda=lda, F77_ldb=ldb;
30 F77_INT F77_ldc=ldc;
31#else
32#define F77_N N
33#define F77_K K
34#define F77_lda lda
35#define F77_ldb ldb
36#define F77_ldc ldc
37#endif
38
39 extern int CBLAS_CallFromC;
40 extern int RowMajorStrg;
41 RowMajorStrg = 0;
43
44
45 if( layout == CblasColMajor )
46 {
47 if ( Uplo == CblasUpper ) UL = 'U';
48 else if (Uplo == CblasLower) UL= 'L';
49 else {
50 API_SUFFIX(cblas_xerbla)(2, "cblas_cgemmtr", "Illegal Uplo setting, %d\n", Uplo);
52 RowMajorStrg = 0;
53 return;
54 }
55
56 if(TransA == CblasTrans) TA='T';
57 else if ( TransA == CblasConjTrans ) TA='C';
58 else if ( TransA == CblasNoTrans ) TA='N';
59 else
60 {
61 API_SUFFIX(cblas_xerbla)(3, "cblas_cgemmtr", "Illegal TransA setting, %d\n", TransA);
63 RowMajorStrg = 0;
64 return;
65 }
66
67 if(TransB == CblasTrans) TB='T';
68 else if ( TransB == CblasConjTrans ) TB='C';
69 else if ( TransB == CblasNoTrans ) TB='N';
70 else
71 {
72 API_SUFFIX(cblas_xerbla)(4, "cblas_cgemmtr", "Illegal TransB setting, %d\n", TransB);
74 RowMajorStrg = 0;
75 return;
76 }
77
78#ifdef F77_CHAR
79 F77_TA = C2F_CHAR(&TA);
80 F77_TB = C2F_CHAR(&TB);
81 F77_UL = C2F_CHAR(&UL);
82#endif
83
84 F77_cgemmtr(F77_UL, F77_TA, F77_TB, &F77_N, &F77_K, alpha, A,
85 &F77_lda, B, &F77_ldb, beta, C, &F77_ldc);
86 }
87 else if (layout == CblasRowMajor)
88 {
89 RowMajorStrg = 1;
90
91 if ( Uplo == CblasUpper ) UL = 'L';
92 else if (Uplo == CblasLower) UL= 'U';
93 else {
94 API_SUFFIX(cblas_xerbla)(2, "cblas_cgemmtr", "Illegal Uplo setting, %d\n", Uplo);
96 RowMajorStrg = 0;
97 return;
98 }
99
100 if(TransA == CblasTrans) TB='T';
101 else if ( TransA == CblasConjTrans ) TB='C';
102 else if ( TransA == CblasNoTrans ) TB='N';
103 else
104 {
105 API_SUFFIX(cblas_xerbla)(3, "cblas_cgemmtr", "Illegal TransA setting, %d\n", TransA);
106 CBLAS_CallFromC = 0;
107 RowMajorStrg = 0;
108 return;
109 }
110 if(TransB == CblasTrans) TA='T';
111 else if ( TransB == CblasConjTrans ) TA='C';
112 else if ( TransB == CblasNoTrans ) TA='N';
113 else
114 {
115 API_SUFFIX(cblas_xerbla)(4, "cblas_cgemmtr", "Illegal TransB setting, %d\n", TransB);
116 CBLAS_CallFromC = 0;
117 RowMajorStrg = 0;
118 return;
119 }
120#ifdef F77_CHAR
121 F77_TA = C2F_CHAR(&TA);
122 F77_TB = C2F_CHAR(&TB);
123 F77_UL = C2F_CHAR(&UL);
124
125#endif
126
127 F77_cgemmtr(F77_UL, F77_TA, F77_TB, &F77_N, &F77_K, alpha, B,
128 &F77_ldb, A, &F77_lda, beta, C, &F77_ldc);
129 }
130 else API_SUFFIX(cblas_xerbla)(1, "cblas_cgemmtr", "Illegal layout setting, %d\n", layout);
131 CBLAS_CallFromC = 0;
132 RowMajorStrg = 0;
133 return;
134}
@ 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
@ CblasColMajor
Definition cblas.h:39
@ CblasRowMajor
Definition cblas.h:39
#define API_SUFFIX(a)
Definition cblas.h:57
#define F77_ldc
#define F77_K
#define F77_ldb
#define F77_TB
#define F77_TA
#define F77_N
#define F77_lda
#define F77_UL
#define F77_INT
#define F77_cgemmtr(...)
Definition cblas_f77.h:416
int CBLAS_CallFromC
int RowMajorStrg
Here is the call graph for this function:
Here is the caller graph for this function: