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

Const array SoA variant #46

Open
bonsairobo opened this issue Feb 26, 2022 · 2 comments
Open

Const array SoA variant #46

bonsairobo opened this issue Feb 26, 2022 · 2 comments

Comments

@bonsairobo
Copy link

I think it would be nice to generate a type like:

pub struct FooArray<const N: usize> {
    pub f1: [f32; N],
    pub f2: [u8; N],
    ...
}

This would allow you to do stuff like core::alloc::Layout::new::<FooArray<128>>() for free.

@Luthaf
Copy link
Member

Luthaf commented Mar 1, 2022

Agrees that this could be nice to do, but I don't have time to implement this myself. If someone wants to contribute this, I can take some time to review PR.

@bonsairobo
Copy link
Author

Sadly this particular feature ended up being a mismatch for my problem, so I don't have a good reason to implement it.

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

No branches or pull requests

2 participants