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

Progress on #235, adding unaligned copy. #266

Conversation

thirtytwobits
Copy link
Contributor

Adding a version of unaligned copy for little-endian platforms that
provides a single abstraction for vectorized unaligned copy. This
replaces the v0 BitStream + unalignedCopy abstractions making a v1
"bit stream" into simply an std::vector and a std::size_t bit_offset.

The abstraction allows the vector's word size to be parameterized which
could provide better optimizations where a given architecture can
perform single operations across multiple bytes instead of hard-coding
all 8-bit operations. The usefulness versus complexity of this
optimization will play out in subsequent pull-requests as we start
utilizing this copy operation in the generated dsdl types.

@thirtytwobits
Copy link
Contributor Author

Sorry. Didn't have time to fix the gcc errors. Will do that tomorrow but I wanted to get the code to you sooner for review.

@thirtytwobits thirtytwobits force-pushed the uavcan-v1/issues/235-2 branch from f57b5c0 to 8553255 Compare August 9, 2019 05:48
@thirtytwobits
Copy link
Contributor Author

Okay. I think this is good. Honestly I won't know for sure till I start using it. The next step is to start building the presentation layer which will utilize this.

Adding a version of unaligned copy for little-endian platforms that
provides a single abstraction for vectorized unaligned copy. This
replaces the v0 BitStream + unalignedCopy abstractions making a v1
"bit stream" into simply an std::vector and a std::size_t bit_offset.

The abstraction allows the vector's word size to be parameterized which
could provide better optimizations where a given architecture can
perform single operations across multiple bytes instead of hard-coding
all 8-bit operations. The usefulness versus complexity of this
optimization will play out in subsequent pull-requests as we start
utilizing this copy operation in the generated dsdl types.

Progress on OpenCyphal-Garage#235, adding unaligned copy

Version 2 of this utility. This one is endian agnostic (I think).
@thirtytwobits thirtytwobits force-pushed the uavcan-v1/issues/235-2 branch from 8553255 to d360245 Compare August 9, 2019 06:07
@thirtytwobits thirtytwobits merged commit 1e0d947 into OpenCyphal-Garage:uavcan-v1.0 Aug 9, 2019
@thirtytwobits thirtytwobits deleted the uavcan-v1/issues/235-2 branch August 9, 2019 15:44
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