/* Each table type (e.g. coul,lj6,lj12) requires four
* numbers per table->n+1 data points. For performance reasons we want
- * the table data to be aligned to a 32-byte boundary.
+ * the table data to be aligned to (at least) a 32-byte boundary.
*/
- snew_aligned(table->data, table->stride * (table->n + 1) * sizeof(real), 32);
+ table->data.resize(table->stride * (table->n + 1) * sizeof(real));
for (int k = 0; (k < etiNR); k++)
{
}
copy2table(table->n, k * table->formatsize, table->stride, td[k].x, td[k].v, td[k].f,
- scalefactor, table->data);
+ scalefactor, table->data.data());
done_tabledata(&(td[k]));
}
dispersionCorrectionTable->ninteractions = 2;
dispersionCorrectionTable->stride =
dispersionCorrectionTable->formatsize * dispersionCorrectionTable->ninteractions;
- snew_aligned(dispersionCorrectionTable->data,
- dispersionCorrectionTable->stride * (dispersionCorrectionTable->n + 1), 32);
+ dispersionCorrectionTable->data.resize(dispersionCorrectionTable->stride
+ * (dispersionCorrectionTable->n + 1));
for (int i = 0; i <= fullTable->n; i++)
{
r(0),
n(0),
scale(0),
- data(nullptr),
formatsize(0),
ninteractions(0),
stride(0)
{
}
-
-t_forcetable::~t_forcetable()
-{
- sfree_aligned(data);
-}