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

Better abstractions for splitting lengths out from VarZeroVec #5378

Open
Manishearth opened this issue Aug 15, 2024 · 0 comments
Open

Better abstractions for splitting lengths out from VarZeroVec #5378

Manishearth opened this issue Aug 15, 2024 · 0 comments
Labels
C-zerovec Component: Yoke, ZeroVec, DataBake
Milestone

Comments

@Manishearth
Copy link
Member

Currently the VarZeroVec allocation is structured as [length, ...offsets, ...data]. However, there are reasons the length could come in externally, perhaps the length is already known because it is a map (#5376), or the length is known constant time (#5240).

We should have a VarZeroSliceUnbound type that represents [...offsets, ...data], whose functions require an externally-provided length. VZS will simply pass in its first length bytes, but other types can do fancier things.

(if not a separate type, we should at least refactor the VZV internal functions to be reusable this way)

Ideally the map polymorphism solution (#3128) will allow for a map type that externally stores a length as well. I'm not quite sure how that would work, but we can design that later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-zerovec Component: Yoke, ZeroVec, DataBake
Projects
None yet
Development

No branches or pull requests

1 participant