Merge pull request #1610 from wmbrownIntel/intel-ncache-alias-fix

Bug fixes for use of uninitialized variable and strict-aliasing in USER-INTEL
This commit is contained in:
Axel Kohlmeyer 2019-08-02 10:42:37 -04:00 committed by GitHub
commit 9c691ddd0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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(