-
Notifications
You must be signed in to change notification settings - Fork 89
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
start working on growable buffer #1472
Conversation
Hi @ianna! I have added a standalone test for Panel implementation using the vector approach. For |
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.
The changes to CMakeLists.txt is a temporary one - just to make sure it builds on my computer. The tests run.
initial_ = initial; | ||
ptr_.push_back(std::make_unique<PRIMITIVE>(initial)); | ||
ptr_.push_back(std::unique_ptr<PRIMITIVE>(new PRIMITIVE[initial])); |
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.
@ManasviGoyal - please, check if the proposed changes work for you. Thanks!
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.
Hi @ianna. The concatenate function still doesn't work but otherwise the changes work for me. Does it work for you?
Also, should I add any other methods from the original GrowableBuffer?
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.
Hi @ianna. The concatenate function still doesn't work but otherwise the changes work for me. Does it work for you?
Yes, please, have a look at the last commit. Also, IMHO we have to move out the index calculations per item. It would be better to make the buffer contiguous first.
Also, should I add any other methods from the original GrowableBuffer?
I think, you need one more method to update the ptr_
with a contiguous panel.
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.
Yes, please, have a look at the last commit. Also, IMHO we have to move out the index calculations per item. It would be better to make the buffer contiguous first.
Okay. So will the concatenation be done externally like it is done here in the main()
or should I just add it inside the getitem_at_nowrap()
?
I think, you need one more method to update the
ptr_
with a contiguous panel.
But that can be done by calling concatenate()
inside the ptr()
method that we already have just like you suggested earlier. So I don't think we need a separate method for that.
07a44d7
to
0125584
Compare
Same question: is this superseded by #1494? I want to know which PRs to pay attention to because they're intended to be merged. |
Yes. It is no longer needed since we switched to the header only implementation. I'll close this too. |
No description provided.