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