forked from lijiext/lammps
Bug fixes for use of uninitialized variable and strict-aliasing in USER-INTEL.
This commit is contained in:
parent
de366c27e2
commit
e57c3c04d0
|
@ -352,15 +352,15 @@ void FixIntel::init()
|
|||
if (_offload_balance != 0.0) off_mode = 1;
|
||||
if (_precision_mode == PREC_MODE_SINGLE) {
|
||||
_single_buffers->zero_ev();
|
||||
_single_buffers->grow_ncache(off_mode,_nthreads);
|
||||
_single_buffers->grow_ncache(off_mode, comm->nthreads);
|
||||
_single_buffers->free_list_ptrs();
|
||||
} else if (_precision_mode == PREC_MODE_MIXED) {
|
||||
_mixed_buffers->zero_ev();
|
||||
_mixed_buffers->grow_ncache(off_mode,_nthreads);
|
||||
_mixed_buffers->grow_ncache(off_mode, comm->nthreads);
|
||||
_mixed_buffers->free_list_ptrs();
|
||||
} else {
|
||||
_double_buffers->zero_ev();
|
||||
_double_buffers->grow_ncache(off_mode,_nthreads);
|
||||
_double_buffers->grow_ncache(off_mode, comm->nthreads);
|
||||
_double_buffers->free_list_ptrs();
|
||||
}
|
||||
|
||||
|
|
|
@ -2223,7 +2223,9 @@ public:
|
|||
}
|
||||
|
||||
VEC_INLINE static ivec unpackloepi32(const fvec &a) {
|
||||
return reinterpret_cast<const int*>(&a.val_)[0];
|
||||
union { int i; flt_t f; } atype;
|
||||
atype.f = a.val_;
|
||||
return ivec(atype.i);
|
||||
}
|
||||
|
||||
VEC_INLINE static fvec mask_sincos(
|
||||
|
|
Loading…
Reference in New Issue