-
Notifications
You must be signed in to change notification settings - Fork 185
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 generics port #198
Const generics port #198
Conversation
I assume there's no reason that only multi-core Producers are marked Send, while Consumers are not (they're pretty symmetrical).
This change allows the create custom structs with size arguments outside the heapless crate itself.
on cortex m0 `%` is extremely costly
vec passes tests vec passes tests with docs as well (besides one with FromIter) vec passes tests with docs as well (besides one with FromIter) exposing full API passing all current tests starting with string string test passes mostly string test passes ufmt passes TODO removed binary_heap wip binary_heap passes tests sealed passes spsc wip spsc wip2 split wip3 spcs and split passes --lib tests spcs and split passes --lib tests spcs and split passes --lib tests spcs and split passes all tests (doc + lib) indexmap wip indexmap passes --lib test indexmap passes all tests (lib + doc) indexset passes all tests (lib + doc) indexset passes all tests (lib + doc) linear map wip linear map all test (lib + doc) passes, drop not tested, into_iter(mut self) not implemented history buffer all test pass (doc + lib), Copy instead of clone atm serde does not work pool works, serde still not serde wip serde wip serde wip serde wip
Hey, there are several fixes for this PR: #199. All tests with const generics passed successfully. |
Fix several issues in const generics
Fix cfail tests in const generics
Simplify code in histbuf for const generics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much cleaner with consts support 👍
Why are |
@Sympatron The docs state (for More or less, we cannot check in const context if N is within the limit of the index. |
We can generate safe constructors for limited range of |
@burrbull How? Const asserts are not allowed to be used with const generics for now. |
See #205 |
Is this mean you've decided to use atomic |
@burrbull Yes, the implementation that existed was not easily amendable to the fix of #207, and the known good implementation performs very well. So for now I'll remove the support for smaller queue indexes, and we can reintroduce them in the future if necessary. |
This commit implements a new, simplified, SPSC that does not have the reported issues (e.g. not properly wrapping the indexes for non powers-of-2), and the support for multiple different index sizes has been removed for simplicity.
ce83c8d
to
6fdcc4f
Compare
deaa3be
to
58cb279
Compare
Closes #158
Closes #168
Closes #207
Closes #115