Replace __float2int_rn with __float2int_rd so that it gives the same answer as static_cast<int>
This commit is contained in:
@ -77,7 +77,7 @@ __kernel void kernel_pair(__global numtyp4 *x_, __global numtyp *fp_,
|
||||
if (rsq<cutforcesq) {
|
||||
numtyp r = ucl_sqrt(rsq);
|
||||
numtyp p = r*rdr + (numtyp)1.0;
|
||||
int m=__float2int_rn(p);
|
||||
int m=__float2int_rd(p);
|
||||
m = MIN(m,nr-1);
|
||||
p -= m;
|
||||
p = MIN(p,(numtyp)1.0);
|
||||
@ -192,7 +192,7 @@ __kernel void kernel_pair_fast(__global numtyp4 *x_, __global numtyp *fp_,
|
||||
if (rsq<cutforcesq) {
|
||||
numtyp r = ucl_sqrt(rsq);
|
||||
numtyp p = r*rdr + (numtyp)1.0;
|
||||
int m=__float2int_rn(p);
|
||||
int m=__float2int_rd(p);
|
||||
m = MIN(m,nr-1);
|
||||
p -= m;
|
||||
p = MIN(p,(numtyp)1.0);
|
||||
|
||||
@ -2,11 +2,7 @@
|
||||
|
||||
newton off
|
||||
|
||||
<<<<<<< HEAD
|
||||
package gpu force 0 0 1
|
||||
=======
|
||||
package gpu force 0 0 1.0
|
||||
>>>>>>> ea346772202c63b86b63ef58a94b89365e209909
|
||||
|
||||
units metal
|
||||
boundary p p p
|
||||
|
||||
Reference in New Issue
Block a user