-
Notifications
You must be signed in to change notification settings - Fork 32
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
Added NativePerJobThreadIntPtrs #5
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks for your submission and sorry it's taken me so long to review it. Aside from the comments I added, two more changes are needed before merging. First, all collections have a thorough set of unit tests to go along with them. Second, all collections are mentioned with a small example in the README. Please add these and I'll take a look. Thanks again!
One more thing: there should also be a |
…ty checks; fixed a bug where the data structure wont work with safety checks off
I've implemented all the requested changes except for the removal of the arbitrary length. On line 236 you can see that Once we are good with this file I'll add in the equivalent long version, tests and readme update. |
Hey @hexonaut , thanks for making all these changes! Allow me to elaborate on my feedback that That said, the presence of a So I'd prefer to keep this type to just the constant-length array of |
I see what you mean now. I can split the code into |
Yes, a separate PR is probably a good idea to keep the branch size manageable. One more thing: I was thinking about the name |
Sounds good to me. I'll make the name switch. |
I generalized NativePerJobThreadIntPtr to take advantage of the wasted cache line space and allow for multiple counters to run at the same time. The buffer will round up to the next cache line size multiple.
Uses array access operators instead of the single Value and Parallel requires an index, but other than that the code is mostly identical.