-
Notifications
You must be signed in to change notification settings - Fork 295
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
Initial implementation of read-only buffer access to raw tables #671
Conversation
This is great! Thanks very much. Will have a go with this, and let you know how I get on! Thanks for the speedy implementation 😄 |
+1 |
No problem! Now it's actually tested as well :) |
@kdmurray91 Was this useful? Should it get merged in? |
ping @kdmurray91 |
Apologies all, I've been on holiday and this must have been lost in a sea of notifications. This was very useful, and still is. Thanks very much @camillescott et al. |
Is there anything that I need to do to get this merged? |
@camillescott claims that she'll be joining the sprint Monday. So hopefully she brings this up to speed for @kdmurray91 |
ping @camillescott :-) |
I swear I added a long comment to this PR yesterday, it appears to have disappeared. Is it just me? |
@kdmurray91 Last comment I see from you is February 22nd :-/ |
Ah crap :) From memory, it went something like: FYI, I've rebased on master here I'd like to get this merged, and am hacking on the code that uses this actively, so consider me willing to do whatever it takes to get this, a) stable, and more user friendly if that's desired, and b) tested/documented/all the other things on the PR checklist. To that end, I proposed making what @camillescott has done an internal feature, then using some wrapper in python land to expose this as either a single numpy array or just do what she has in her demo in the PR description. This could be done by wrapping (i.e. subclassing as is done with Also, let me know your thoughts on a read/write version of this too, as algorithm I'm working on relies on adding/subtracting hashes (ignoring bigcount which we're not using). It would be useful to have, and am happy to work on ways of doing this safely under circumstances where it is safe (e.g., using the busywait locks and Anyway, that turned out to be more mental diarrhea than a comment, but that's my 0.000002 BTC, as the cool kids say. Cheers, |
+1 for merging this w/o a script frontend as that does not commit us to anything. I'm fine with experimental Python & C++ APIs. @camillescott or @kdmurray91 can you either update this PR with a filled out checklist or make a new PR? |
Yup! Unless @camillescott rebases in the next hour, I'll make a new PR from my rebased branch. Or could I push to this branch? On a side note, is there any merit to having the likes of a |
|
The APIs are getting a slow overhaul and are subject to change at any time so there is no current need to segregate; thanks though! |
OK, so to avoid nuking anything I've made a backup of this branch here: and will have a go at pushing directly to this branch |
5004c00
to
635aa28
Compare
What's the policy on cleaning formatting errors etc in places not touched by the changes in a PR? E.g., there's some formatting issues in the HLL counter, I assume I leave those for another PR? |
2bcebc0
to
3089a9f
Compare
All ticked off! |
You're on the hook for lines of code you touch, and no other :-) I'm sure @luizirber will want to hear about any HLL issues. |
LGTM |
Initial implementation of read-only buffer access to raw tables
Share & enjoy! |
Thanks for putting in the work to make this mergeable @kdmurray91! And sorry for ducking out on it myself; got distracted with other things. |
All good, thanks for your initial work 😄 |
This addresses #667: exposes the tables as a read-only buffer object. I've chosen read-only as there will be undefined behavior from writing directly to the tables outside of the
count
functions; of course, the idea is that you can still use the python-exposed hashtable object as you see fit, and the buffer view will update to reflect that.For now, I've just exported a list of
N
buffers. Eventually I'd like this to properly define the buffer interface on the hashtable type object, exposing a single buffer or memoryview object with proper striding / offsets for theN
dimension array, but... :effort:.Some example usage: