]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
fdr_confirm: start FDRConfirm structs at cacheline
authorJustin Viiret <justin.viiret@intel.com>
Tue, 23 May 2017 04:44:20 +0000 (14:44 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Mon, 21 Aug 2017 00:38:59 +0000 (10:38 +1000)
src/fdr/fdr_confirm_compile.cpp

index fa064bf3a664c2138cf770d7032cf86181db7171..2c8359389e938a1ccc0a7d34ab2459b5bbb3ce05 100644 (file)
@@ -364,14 +364,15 @@ setupFullConfs(const vector<hwlmLiteral> &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<u8>(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;