Open
Conversation
Introduce a test utility type that is a non-contiguous container that is highly configurable in structure so we can test various conditions in upcoming features.
This enables accessing values in generic functionality that works through any iterator, allowing transparent `memcpy` performance for pointers (all major compilers will compile `std::copy_n` for a `char`-like pointer into a memcpy), while supporting arbitrary iterators. Added tests that exaustively test various possible non-contiguous arrangements.
Create a storage type for arbitrary iteratable types, technically supporting contiguous buffers, though continue to keep contiguous buffers as it is much more performant for contiguous access.
Enable creating a struct view over non-contiguous containers using the Make<Struct>View generated functions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for views over non-contiguous containers, allowing direct access and mutation via iterators. Iterator access is slower than contiguous containers, as currently there is no support for communicating contiguity metadata to the Emboss runtime support, but if that information is surfaced in the future as an optimization then it can defer to contiguous
MemoryAccessors for copies that are not across a contiguity boundary, which should improve performance.This should not have an effect on existing contiguous containers as they continue to use contiguous memory access and
std::copy_nwill optimize tomemcpyin all major compilers.Contains the following commits:
Introduce noncontiguous container utility
Introduce a test utility type that is a non-contiguous container that is
highly configurable in structure so we can test various conditions in
upcoming features.
Add UnalignedAccessor to read/write through iterator
This enables accessing values in generic functionality that works
through any iterator, allowing transparent
memcpyperformance forpointers (all major compilers will compile
std::copy_nfor achar-like pointer into a memcpy), while supporting arbitraryiterators.
Added tests that exhaustively test various possible non-contiguous
arrangements.
Introduce IteratorStorage for any iterable
Create a storage type for arbitrary iteratable types, technically
supporting contiguous buffers, though continue to keep contiguous
buffers as it is much more performant for contiguous access.
Add support for IteratorStorage to Make[Struct]View
Enable creating a struct view over non-contiguous containers using the
Make[Struct]View generated functions.