1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-require-effective-target powerpc_vsx_ok } */
4 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
5 /* { dg-options "-O2 -ffast-math -mcpu=power7" } */
13 double vx
, vy
, vz
, vw
, dx
, dy
, dz
;
20 double r
, r0
, xt
, yt
, zt
;
21 double lcutoff
, cutoff
, get_f_variable ();
23 int inbond
, inangle
, i
;
24 ATOM
*a1
, *a2
, *bonded
[10], *angled
[10];
26 int uselist (), nuse
, used
;
28 int a_number (), inbuffer
;
29 double (*buffer
)[], xx
, yy
, zz
, k
;
30 int invector
, atomsused
, ii
, jj
, imax
;
35 dielectric
= get_f_variable ("dielec");
37 for (jj
= 1; jj
< imax
; jj
++, a1
= bp
)
39 if ((*use
)[used
] == a1
)
43 while ((*use
)[used
] != a1
)
45 for (i
= 0; i
< inbuffer
; i
++)
48 xx
= a1
->x
+ lambda
* a1
->dx
;
49 yy
= a1
->y
+ lambda
* a1
->dy
;
50 zz
= a1
->z
+ lambda
* a1
->dz
;
51 for (i
= 0; i
< inbuffer
; i
++)
53 xt
= xx
- (*buffer
)[3 * i
];
54 yt
= yy
- (*buffer
)[3 * i
+ 1];
55 zt
= zz
- (*buffer
)[3 * i
+ 2];
56 r
= xt
* xt
+ yt
* yt
+ zt
* zt
;
61 -a1
->q
* (*atms
)[i
]->q
* dielectric
* exp (-r0
/ rdebye
) *
62 (1. / (rdebye
* r0
) + 1. / r
);
63 k
+= a1
->a
* (*atms
)[i
]->a
/ r
/ r0
* 6;
64 k
-= a1
->b
* (*atms
)[i
]->b
/ r
/ r
/ r0
* 12;
65 (*vector
)[3 * i
] = xt
* k
;
66 (*vector
)[3 * i
+ 1] = yt
* k
;
67 (*vector
)[3 * i
+ 2] = zt
* k
;