Bug fixes for use of uninitialized variable and strict-aliasing in USER-INTEL.

This commit is contained in:
Michael Brown 2019-08-01 05:32:18 -07:00
parent de366c27e2
commit e57c3c04d0
2 changed files with 6 additions and 4 deletions

View File

@ -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();
}

View File

@ -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(