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

Implement chunks #50

Open
samufi opened this issue Jan 24, 2025 · 0 comments
Open

Implement chunks #50

samufi opened this issue Jan 24, 2025 · 0 comments

Comments

@samufi
Copy link
Owner

samufi commented Jan 24, 2025

Chunks are contiguous blocks of memory (everything that is in one Archetype) and allow the same get features as an EntityAccessor. However, they return pointers to the beginning of the block so that efficient SIMD operations can be done. There should also be a get_as method that simply casts the pointer of the component but does an additional comptime size check. Lastly, an important attribute is size, so that a chunk can be efficiently processed in loops.

There should be an iterator that iterates over all chunks of a certain pattern.

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

1 participant