Unverified Commit 4507205c authored by cmd23333's avatar cmd23333 Committed by GitHub
Browse files

Bugfix: Zero-initialize padded posq buffer in AmoebaCommonKernels (#5071)


Co-authored-by: default avatarchenlei.2333 <chenlei.2333@bytedance.com>
parent f55abcaa
......@@ -263,6 +263,10 @@ void CommonCalcAmoebaMultipoleForceKernel::initialize(const System& system, cons
localDipolesVec.push_back(0);
for (int j = 0; j < 5; j++)
localQuadrupolesVec.push_back(0);
if (cc.getUseDoublePrecision())
posqd[i] = mm_double4(0, 0, 0, 0);
else
posqf[i] = mm_float4(0, 0, 0, 0);
}
dampingAndThole.initialize<mm_float2>(cc, paddedNumAtoms, "dampingAndThole");
polarizability.initialize<float>(cc, paddedNumAtoms, "polarizability");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment