You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your need for aligned globals has come up before and the best way to get some aligned static data without making a new struct every single time is to generalize what you did with the SSEMask type:
I like this approach, we could implement it for a few common aligment values: 16 (common for SSE values), 32, 64 (common for cache-aligned data) and maybe 128.
The text was updated successfully, but these errors were encountered:
Align4 is also popular to make include_bytes! be "word aligned" so you can safely cast it to &[u32] without fail.
The drawback of is this that it doesn't work on static mut, but you really shouldn't be using static mut in the first place if it's in any way possible to avoid it, and usually you can avoid it.
Submitted by @Lokathor via email:
I like this approach, we could implement it for a few common aligment values: 16 (common for SSE values), 32, 64 (common for cache-aligned data) and maybe 128.
The text was updated successfully, but these errors were encountered: