Go to the source code of this file.
◆ BI_GetMpiTrType()
| MPI_Datatype BI_GetMpiTrType |
( |
BLACSCONTEXT * | ctxt, |
|
|
char | uplo, |
|
|
char | diag, |
|
|
Int | m, |
|
|
Int | n, |
|
|
Int | lda, |
|
|
MPI_Datatype | Dtype, |
|
|
Int * | N ) |
Definition at line 3 of file BI_GetMpiTrType.c.
6{
8 MPI_Datatype TrType;
12
13 if (diag == 'u') start = 1;
14 else start = 0;
15
16
17
18
19
20#ifdef ZeroByteTypeBug
21 if (m >
n) i =
n * (m-
n) + (
n*
n) - (
n*
n)/2 +
n/2 -
n*start;
22 else i = m * (
n-m) + (m*m) - (m*m)/2 + m/2 - m*start;
23 if (i < 1)
24 {
26 return (MPI_BYTE);
27 }
28#endif
30
31
32
33
37
39 {
40 if (uplo == 'u')
41 {
42 k = m -
n + 1 - start;
44 {
45 len[i] = k + i;
47 }
48 }
49 else
50 {
51 k = m - start;
52 lda++;
53 len[0] = k;
56 {
57 len[i] = k - i;
59 }
60 }
61 }
62 else
63 {
64 if (uplo == 'u')
65 {
66 k = 1 - start;
67 for (i=0; i < m; i++)
68 {
69 len[i] = i + k;
71 }
73 {
74 len[i] = m;
76 }
77 }
78 else
79 {
81 for (i=0; i < k; i++)
82 {
83 len[i] = m;
85 }
87 {
89 len[i] = k - i;
90 disp[i] = i*lda + start;
91 lda++;
93 {
94 len[i] = k - i;
96 }
97 }
98 }
99 }
100#ifdef T3ETrError
101
102
103
104 for (i=0; i <
n; i++)
105 {
106 if (len[i] == 0)
107 {
108 for (k=i+1; k <
n; k++)
109 {
110 len[k-1] = len[k];
112 }
114 i--;
115 }
116 }
117#endif
118
119 i=MPI_Type_indexed(
n, len,
disp, Dtype, &TrType);
120 i=MPI_Type_commit(&TrType);
121 return(TrType);
122}
BLACBUFF * BI_GetBuff(Int length)
if(norm(mat *id.SOL - id.RHS, 'inf') > sqrt(eps)) disp('WARNING els disp)('SOLUTION OK')