From 549062ec2bffeba165844d175b328e8669b67098 Mon Sep 17 00:00:00 2001 From: Justin Viiret Date: Tue, 23 May 2017 14:44:20 +1000 Subject: [PATCH] fdr_confirm: start FDRConfirm structs at cacheline --- src/fdr/fdr_confirm_compile.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fdr/fdr_confirm_compile.cpp b/src/fdr/fdr_confirm_compile.cpp index fa064bf3..2c835938 100644 --- a/src/fdr/fdr_confirm_compile.cpp +++ b/src/fdr/fdr_confirm_compile.cpp @@ -364,14 +364,15 @@ setupFullConfs(const vector &lits, } u32 nBuckets = eng.getNumBuckets(); - u32 totalConfSwitchSize = nBuckets * sizeof(u32); - u32 totalSize = ROUNDUP_16(totalConfSwitchSize + totalConfirmSize); + u32 totalConfSwitchSize = ROUNDUP_CL(nBuckets * sizeof(u32)); + u32 totalSize = totalConfSwitchSize + totalConfirmSize; auto buf = make_zeroed_bytecode_ptr(totalSize, 64); assert(buf); // otherwise would have thrown std::bad_alloc u32 *confBase = (u32 *)buf.get(); u8 *ptr = buf.get() + totalConfSwitchSize; + assert(ISALIGNED_CL(ptr)); for (const auto &m : bc2Conf) { const BucketIndex &idx = m.first;