SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ BI_cvvamn2()

void BI_cvvamn2 ( Int  N,
char *  vec1,
char *  vec2 
)

Definition at line 2 of file BI_cvvamn2.c.

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}
#define Int
Definition Bconfig.h:22
#define Rabs(x)
Definition Bdef.h:269
Here is the caller graph for this function: