ScaLAPACK 2.1
2.1
ScaLAPACK: Scalable Linear Algebra PACKage
BI_ivvamx.c
Go to the documentation of this file.
1
#include "
Bdef.h
"
2
void
BI_ivvamx
(
int
N,
char
*vec1,
char
*vec2)
3
{
4
int
*v1=(
int
*)vec1, *v2=(
int
*)vec2;
5
int
diff;
6
BI_DistType
*dist1, *dist2;
7
int
i, k;
8
9
k = N *
sizeof
(int);
10
i = k %
sizeof
(
BI_DistType
);
11
if
(i) k +=
sizeof
(
BI_DistType
) - i;
12
dist1 = (
BI_DistType
*) &vec1[k];
13
dist2 = (
BI_DistType
*) &vec2[k];
14
15
for
(k=0; k < N; k++)
16
{
17
diff =
Rabs
(v1[k]) -
Rabs
(v2[k]);
18
if
(diff < 0)
19
{
20
v1[k] = v2[k];
21
dist1[k] = dist2[k];
22
}
23
else
if
(diff == 0)
24
{
25
if
(dist1[k] > dist2[k])
26
{
27
v1[k] = v2[k];
28
dist1[k] = dist2[k];
29
}
30
}
31
}
32
}
Rabs
#define Rabs(x)
Definition:
Bdef.h:269
Bdef.h
BI_ivvamx
void BI_ivvamx(int N, char *vec1, char *vec2)
Definition:
BI_ivvamx.c:2
BI_DistType
#define BI_DistType
Definition:
Bdef.h:72
BLACS
SRC
BI_ivvamx.c
Generated by
1.8.16