Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Replace generated arrays with macro declarations, align cache lines to 64 bytes #235

Merged
merged 6 commits into from
Jan 29, 2025

Conversation

nicbarker
Copy link
Owner

@nicbarker nicbarker commented Jan 28, 2025

This PR removes a significant amount of generated array handling code and replaces it with macros for the declarations.
It also removes the need to compute the alignment of various structs, as all arena members are now aligned to cache line boundaries (64 bytes)

@nicbarker nicbarker changed the title Replace generated arrays with macro declarations, align cache lines to 64 bytes [Core] Replace generated arrays with macro declarations, align cache lines to 64 bytes Jan 29, 2025
@nicbarker nicbarker merged commit 1bcf256 into main Jan 29, 2025
3 checks passed

extern Clay_LayoutConfig CLAY_LAYOUT_DEFAULT;

// Rectangle
// NOTE: Not declared in the typedef as an ifdef inside macro arguments is UB
struct Clay_RectangleElementConfig {
// NOTE: Not declared in the typedef asan ifdef inside macro arguments is UB
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment isn't relevant any more, as there's no TYPEDEF macro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants