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

Growable Buffer header #1535

Merged
merged 4 commits into from
Jul 7, 2022
Merged

Growable Buffer header #1535

merged 4 commits into from
Jul 7, 2022

Conversation

ManasviGoyal
Copy link
Collaborator

@ManasviGoyal ManasviGoyal commented Jul 6, 2022

New header-only implementation of Growable Buffer using panels. Contains the following :-

  • GrowableBuffer.h
  • Unit Tests for GrowableBuffer
  • Documentation of GrowableBuffer.h

@codecov
Copy link

codecov bot commented Jul 6, 2022

Codecov Report

Merging #1535 (502a84c) into main (78a6535) will decrease coverage by 0.11%.
The diff coverage is 57.93%.

Impacted Files Coverage Δ
src/awkward/_v2/highlevel.py 70.77% <57.60%> (-2.76%) ⬇️
src/awkward/_v2/_connect/numba/arrayview.py 96.76% <100.00%> (ø)

Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! The location of this file will move and it the class will get new methods, but this is a good checkpoint.

To get the tests to pass, merge with main. @ioanaif's #1533 fixes the pre-commit issues that you see. Once it does pass tests, you can squash-and-merge it yourself.

@ManasviGoyal
Copy link
Collaborator Author

Great! The location of this file will move and it the class will get new methods, but this is a good checkpoint.

To get the tests to pass, merge with main. @ioanaif's #1533 fixes the pre-commit issues that you see. Once it does pass tests, you can squash-and-merge it yourself.

Sure. Thanks. I have added the function that is needed for use in Array Builder. So, it should be able to work with Array Builders and the new Layout Builder. New methods can be added as and when they are needed.

@jpivarski
Copy link
Member

At some point, we should be able to remove the old GrowableBuffer, too.

Is that currently dead code? (I.e. if you just remove the old GrowableBuffer, can it compile?) When it is possible to remove, let's do that right away so that we don't end up with a name conflict somehow.

Fortunately, GrowableBuffer does not have a pybind11 interface, so there won't be anything in the src/python directory to dismantle.

Copy link
Collaborator

@ianna ianna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, see my comment about accessing private members from a static function. Thanks.

src/awkward/_v2/cpp-headers/GrowableBuffer.h Outdated Show resolved Hide resolved
Copy link
Collaborator

@ianna ianna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, my compiler does not like that the static function accesses the private members. Here is an alternative implementation.

src/awkward/_v2/cpp-headers/GrowableBuffer.h Outdated Show resolved Hide resolved
Copy link
Collaborator

@ianna ianna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! Thanks. Please, merge it when the tests pass.

@ianna ianna merged commit 371865f into main Jul 7, 2022
@ianna ianna deleted the manasvi/growable_buffer_header branch July 7, 2022 10:07
@jpivarski
Copy link
Member

@all-contributors please add @ManasviGoyal for code

@allcontributors
Copy link
Contributor

@jpivarski

I've put up a pull request to add @ManasviGoyal! 🎉

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.

3 participants