Unverified Commit 9c691ddd authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

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

Bug fixes for use of uninitialized variable and strict-aliasing in USER-INTEL
parents 828ddfd9 e57c3c04
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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();
  }

+3 −1
Original line number Diff line number Diff line
@@ -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(