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

Support for different container types in saltatlas::dhnsw::dhnsw::partition_data() #25

Closed
bwpriest opened this issue Dec 22, 2022 · 0 comments

Comments

@bwpriest
Copy link
Member

In order to achieve type safety, we templated saltatlas::dhnsw::dhnsw::partition_data() on a map-like type signature Container<index_t, point_t>, and all of the lambdas that saltatlas sends to these containers expect to iterate over std::pair<index_t, point_t>. This works perfectly well for ygm::container::map, as was originally intended. However, it requires the awkward workaround ygm::container::pair_bag to work with distributed bags of key-value types, and does not work at all with other containers of interest. For example ygm::container::array does not work both because the template parameter orders are switched, and because the lambdas expect to iterate over (const index_t, point_t).

In order to provide a more general data interface to saltatlas, we can either modify ygm to make the containers accept a uniform lambda format, or maintain different partitioning implementations for saltatlas that can work with the different data structures.

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

No branches or pull requests

1 participant