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
pdlaswpc.c
Go to the documentation of this file.
1 
15 #include "common.h"
16 
17 #define B(m, n) BLKADDR(B, double, m, n)
18 #define IPIV(k) &(IPIV[(int64_t)B.mb*(int64_t)(k)])
19 
20 /***************************************************************************/
24  PLASMA_sequence *sequence, PLASMA_request *request)
25 {
28 
29  int m, n;
30  int tempj, tempn, tempmm, tempnn;
31 
32  plasma = plasma_context_self();
33  if (sequence->status != PLASMA_SUCCESS)
34  return;
35  QUARK_Task_Flag_Set(&task_flags, TASK_SEQUENCE, (intptr_t)sequence->quark_sequence);
36 
37  if ( inc > 0 )
38  {
39  for (n = 0; n < B.nt; n++) {
40  tempj = n * B.nb;
41  tempn = B.n - tempj;
42  tempnn = n == B.nt-1 ? tempn : B.nb;
43 
44  for (m = 0; m < B.mt; m++) {
45  tempmm = m == B.mt-1 ? B.m - m * B.mb : B.mb;
46 
48  plasma->quark, &task_flags,
49  plasma_desc_submatrix(B, m*B.mb, tempj, tempmm, tempn),
50  B(m, n), 1, tempnn, IPIV(n), inc, B(m, B.nt-1) );
51  }
52  }
53  }
54  else
55  {
56  for (n = B.nt-1; n > -1; n--) {
57  tempj = n * B.nb;
58  tempn = B.n - tempj;
59  tempnn = n == B.nt-1 ? tempn : B.nb;
60 
61  for (m = 0; m < B.mt; m++) {
62  tempmm = m == B.mt-1 ? B.m - m * B.mb : B.mb;
63 
65  plasma->quark, &task_flags,
66  plasma_desc_submatrix(B, m*B.mb, tempj, tempmm, tempn),
67  B(m, n), 1, tempnn, IPIV(n), inc, B(m, 0) );
68  }
69  }
70  }
71 }