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

Implement RingQueue::resize() #770

Closed
gavv opened this issue Jul 29, 2024 · 3 comments
Closed

Implement RingQueue::resize() #770

gavv opened this issue Jul 29, 2024 · 3 comments
Labels
easy hacks The solution is expected to be straightforward even if you are new to the project enhancement help wanted An important and awaited task but we have no human resources for it yet
Milestone

Comments

@gavv
Copy link
Member

gavv commented Jul 29, 2024

Add resize() method to core::RingQueue (fifo on top of ring buffer).

Example of similar method can be found in core::Array. Note how it invokes constructors and destructors of the elements.

We also need to add tests for resizing to test_ring_queue.cpp.

@gavv gavv added enhancement help wanted An important and awaited task but we have no human resources for it yet easy hacks The solution is expected to be straightforward even if you are new to the project labels Jul 29, 2024
@gavv gavv added this to Roc Toolkit Jul 29, 2024
@github-project-automation github-project-automation bot moved this to Frontlog in Roc Toolkit Jul 29, 2024
@gavv gavv moved this from Frontlog to Help wanted in Roc Toolkit Jul 29, 2024
@AvvALlV
Copy link

AvvALlV commented Aug 4, 2024

Hi, I would like to take this issue

AvvALlV added a commit to AvvALlV/roc-toolkit that referenced this issue Aug 4, 2024
@parsh89
Copy link

parsh89 commented Sep 26, 2024

Hey what is the purpose of resizing? like what does it do?

@gavv gavv added this to the next milestone Nov 26, 2024
gavv pushed a commit to AvvALlV/roc-toolkit that referenced this issue Nov 26, 2024
gavv pushed a commit that referenced this issue Nov 26, 2024
gavv added a commit to gavv/roc-toolkit that referenced this issue Nov 26, 2024
@gavv
Copy link
Member Author

gavv commented Nov 26, 2024

Pull request merged.

Here is the comment for resize():

    //! Change ring queue capacity.
    //! @remarks
    //!  After this call, capacity() is equal to the new value, and size()
    //!  is either the same as before or smaller if capacity decreased.
    //!  When needed, performs reallocation or destroys excess elements in
    //!  the end of the queue.
    //! @returns
    //!  false if the allocation failed

@gavv gavv closed this as completed Nov 26, 2024
@github-project-automation github-project-automation bot moved this from Help wanted to Done in Roc Toolkit Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy hacks The solution is expected to be straightforward even if you are new to the project enhancement help wanted An important and awaited task but we have no human resources for it yet
Projects
Status: Done
Development

No branches or pull requests

3 participants