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_zlaset2.c
Go to the documentation of this file.
1 
15 #include <lapacke.h>
16 #include "common.h"
17 
18 /***************************************************************************/
52 #if defined(PLASMA_HAVE_WEAK)
53 #pragma weak CORE_zlaset2 = PCORE_zlaset2
54 #define CORE_zlaset2 PCORE_zlaset2
55 #endif
56 void CORE_zlaset2(PLASMA_enum uplo, int M, int N,
57  PLASMA_Complex64_t alpha, PLASMA_Complex64_t *A, int LDA)
58 {
59  if (uplo == PlasmaUpper) {
60  LAPACKE_zlaset_work(
61  LAPACK_COL_MAJOR,
62  lapack_const(uplo),
63  M, N-1, alpha, alpha, A+LDA, LDA);
64  }
65  else if (uplo == PlasmaLower) {
66  LAPACKE_zlaset_work(
67  LAPACK_COL_MAJOR,
68  lapack_const(uplo),
69  M-1, N, alpha, alpha, A+1, LDA);
70  }
71  else {
72  LAPACKE_zlaset_work(
73  LAPACK_COL_MAJOR,
74  lapack_const(uplo),
75  M, N, alpha, alpha, A, LDA);
76  }
77 }
78 
79 /***************************************************************************/
82 void QUARK_CORE_zlaset2(Quark *quark, Quark_Task_Flags *task_flags,
83  PLASMA_enum uplo, int M, int N,
84  PLASMA_Complex64_t alpha, PLASMA_Complex64_t *A, int LDA)
85 {
86  QUARK_Insert_Task(quark, CORE_zlaset2_quark, task_flags,
87  sizeof(PLASMA_enum), &uplo, VALUE,
88  sizeof(int), &M, VALUE,
89  sizeof(int), &N, VALUE,
90  sizeof(PLASMA_Complex64_t), &alpha, VALUE,
91  sizeof(PLASMA_Complex64_t)*M*N, A, OUTPUT,
92  sizeof(int), &LDA, VALUE,
93  0);
94 }
95 
96 /***************************************************************************/
99 #if defined(PLASMA_HAVE_WEAK)
100 #pragma weak CORE_zlaset2_quark = PCORE_zlaset2_quark
101 #define CORE_zlaset2_quark PCORE_zlaset2_quark
102 #endif
104 {
105  int uplo;
106  int M;
107  int N;
108  PLASMA_Complex64_t alpha;
110  int LDA;
111 
112  quark_unpack_args_6(quark, uplo, M, N, alpha, A, LDA);
113  CORE_zlaset2(uplo, M, N, alpha, A, LDA);
114 }