MPMCQueue icon indicating copy to clipboard operation
MPMCQueue copied to clipboard

static assertion failed

Open ZwjAccount opened this issue 2 years ago • 2 comments

I created a queue of global variables, but an error occurred during compilation. Slot must be aligned to cache line boundary to prevent false sharing. 141 | alignof(Slot<T>) == hardwareInterferenceSize, The way to create a queue is as follows: MPMCQueue<HqOpsStoreMessage<SzeSseAssembleSnap>> snap_mpmc_queue(MPMCBUF_SIZE); How to solve this problem?

ZwjAccount avatar Nov 20 '23 10:11 ZwjAccount

Can you share more of your code - a small reproducable section of code, please?

brmarkus avatar Nov 20 '23 11:11 brmarkus

How about tomorrow? I just found the #program once directive in another third-party library I use. I'll move on to see if it's causing the impact, and if not, I'm giving you some more of my code.

---- Replied Message ---- | From | Markus @.> | | Date | 11/20/2023 19:44 | | To | rigtorp/MPMCQueue @.> | | Cc | ZwjAccount @.>, Author @.> | | Subject | Re: [rigtorp/MPMCQueue] static assertion failed (Issue #45) |

Can you share more of your code - a small reproducable section of code, please?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

ZwjAccount avatar Nov 20 '23 11:11 ZwjAccount