Skip to content

Commit 9e9e518

Browse files
authored
Make Summary 128-bit aligned within the cacheline (#111)
1 parent c230b4f commit 9e9e518

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/babylon/concurrent/counter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ using ConcurrentMiner = GenericsConcurrentMiner<ssize_t>;
208208
class ConcurrentSummer {
209209
public:
210210
// 计数结果二元组,总和&总量
211-
struct Summary {
211+
struct alignas(BABYLON_CACHELINE_SIZE) Summary {
212212
ssize_t sum;
213213
size_t num;
214214
};

0 commit comments

Comments
 (0)