forked from lijiext/lammps
Merge pull request #1485 from Adrian-Diaz/memcpy2memmove
replace some calls to `memcpy()` with calls to `memmove()`
This commit is contained in:
commit
1dc8bb163d
|
@ -56,7 +56,7 @@ int mldivide3(const double m[3][3], const double *v, double *ans)
|
|||
if (fabs(aug[j][i]) > fabs(aug[i][i])) {
|
||||
double tempv[4];
|
||||
memcpy(tempv,aug[i],4*sizeof(double));
|
||||
memcpy(aug[i],aug[j],4*sizeof(double));
|
||||
memmove(aug[i],aug[j],4*sizeof(double));
|
||||
memcpy(aug[j],tempv,4*sizeof(double));
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ int mldivide3(const double m[3][3], const double *v, double *ans)
|
|||
if (p != i) {
|
||||
double tempv[4];
|
||||
memcpy(tempv,aug[i],4*sizeof(double));
|
||||
memcpy(aug[i],aug[p],4*sizeof(double));
|
||||
memmove(aug[i],aug[p],4*sizeof(double));
|
||||
memcpy(aug[p],tempv,4*sizeof(double));
|
||||
}
|
||||
|
||||
|
|
|
@ -537,7 +537,7 @@ void RCB::compute(int dimension, int n, double **x, double *wt,
|
|||
if (dotmark[i] == markactive)
|
||||
memcpy(&buf[outgoing++],&dots[i],sizeof(Dot));
|
||||
else
|
||||
memcpy(&dots[keep++],&dots[i],sizeof(Dot));
|
||||
memmove(&dots[keep++],&dots[i],sizeof(Dot));
|
||||
}
|
||||
|
||||
// post receives for dots
|
||||
|
@ -1029,7 +1029,7 @@ void RCB::compute_old(int dimension, int n, double **x, double *wt,
|
|||
if (dotmark[i] == markactive)
|
||||
memcpy(&buf[outgoing++],&dots[i],sizeof(Dot));
|
||||
else
|
||||
memcpy(&dots[keep++],&dots[i],sizeof(Dot));
|
||||
memmove(&dots[keep++],&dots[i],sizeof(Dot));
|
||||
}
|
||||
|
||||
// post receives for dots
|
||||
|
|
Loading…
Reference in New Issue