PLASMA  2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
core_ctrmm.c
Go to the documentation of this file.
1 
17 #include "common.h"
18 
19 /***************************************************************************/
24 #if defined(PLASMA_HAVE_WEAK)
25 #pragma weak CORE_ctrmm = PCORE_ctrmm
26 #define CORE_ctrmm PCORE_ctrmm
27 #endif
28 void CORE_ctrmm(int side, int uplo,
29  int transA, int diag,
30  int M, int N,
31  PLASMA_Complex32_t alpha,
32  PLASMA_Complex32_t *A, int LDA,
33  PLASMA_Complex32_t *B, int LDB)
34 {
37  (CBLAS_SIDE)side, (CBLAS_UPLO)uplo,
38  (CBLAS_TRANSPOSE)transA, (CBLAS_DIAG)diag,
39  M, N,
40  CBLAS_SADDR(alpha), A, LDA,
41  B, LDB);
42 }
43 
44 /***************************************************************************/
47 void QUARK_CORE_ctrmm(Quark *quark, Quark_Task_Flags *task_flags,
48  int side, int uplo, int transA, int diag,
49  int m, int n, int nb,
50  PLASMA_Complex32_t alpha, PLASMA_Complex32_t *A, int lda,
51  PLASMA_Complex32_t *B, int ldb)
52 {
54  QUARK_Insert_Task(quark, CORE_ctrmm_quark, task_flags,
55  sizeof(PLASMA_enum), &side, VALUE,
56  sizeof(PLASMA_enum), &uplo, VALUE,
57  sizeof(PLASMA_enum), &transA, VALUE,
58  sizeof(PLASMA_enum), &diag, VALUE,
59  sizeof(int), &m, VALUE,
60  sizeof(int), &n, VALUE,
61  sizeof(PLASMA_Complex32_t), &alpha, VALUE,
62  sizeof(PLASMA_Complex32_t)*nb*nb, A, INPUT,
63  sizeof(int), &lda, VALUE,
64  sizeof(PLASMA_Complex32_t)*nb*nb, B, INOUT,
65  sizeof(int), &ldb, VALUE,
66  0);
67 }
68 
69 /***************************************************************************/
72 #if defined(PLASMA_HAVE_WEAK)
73 #pragma weak CORE_ctrmm_quark = PCORE_ctrmm_quark
74 #define CORE_ctrmm_quark PCORE_ctrmm_quark
75 #endif
76 void CORE_ctrmm_quark(Quark *quark)
77 {
78  int side;
79  int uplo;
80  int transA;
81  int diag;
82  int M;
83  int N;
84  PLASMA_Complex32_t alpha;
86  int LDA;
88  int LDB;
89 
90  quark_unpack_args_11(quark, side, uplo, transA, diag, M, N, alpha, A, LDA, B, LDB);
93  (CBLAS_SIDE)side, (CBLAS_UPLO)uplo,
94  (CBLAS_TRANSPOSE)transA, (CBLAS_DIAG)diag,
95  M, N,
96  CBLAS_SADDR(alpha), A, LDA,
97  B, LDB);
98 }
99 
100 /***************************************************************************/
103 void QUARK_CORE_ctrmm_p2(Quark *quark, Quark_Task_Flags *task_flags,
104  int side, int uplo, int transA, int diag,
105  int m, int n, int nb,
106  PLASMA_Complex32_t alpha, PLASMA_Complex32_t *A, int lda,
107  PLASMA_Complex32_t **B, int ldb)
108 {
110  QUARK_Insert_Task(quark, CORE_ctrmm_p2_quark, task_flags,
111  sizeof(PLASMA_enum), &side, VALUE,
112  sizeof(PLASMA_enum), &uplo, VALUE,
113  sizeof(PLASMA_enum), &transA, VALUE,
114  sizeof(PLASMA_enum), &diag, VALUE,
115  sizeof(int), &m, VALUE,
116  sizeof(int), &n, VALUE,
117  sizeof(PLASMA_Complex32_t), &alpha, VALUE,
118  sizeof(PLASMA_Complex32_t)*lda*nb, A, INPUT,
119  sizeof(int), &lda, VALUE,
120  sizeof(PLASMA_Complex32_t*), B, INOUT,
121  sizeof(int), &ldb, VALUE,
122  0);
123 }
124 
125 /***************************************************************************/
128 #if defined(PLASMA_HAVE_WEAK)
129 #pragma weak CORE_ctrmm_p2_quark = PCORE_ctrmm_p2_quark
130 #define CORE_ctrmm_p2_quark PCORE_ctrmm_p2_quark
131 #endif
133 {
134  int side;
135  int uplo;
136  int transA;
137  int diag;
138  int M;
139  int N;
140  PLASMA_Complex32_t alpha;
142  int LDA;
144  int LDB;
145 
146  quark_unpack_args_11(quark, side, uplo, transA, diag, M, N, alpha, A, LDA, B, LDB);
147  cblas_ctrmm(
149  (CBLAS_SIDE)side, (CBLAS_UPLO)uplo,
150  (CBLAS_TRANSPOSE)transA, (CBLAS_DIAG)diag,
151  M, N,
152  CBLAS_SADDR(alpha), A, LDA,
153  *B, LDB);
154 }