Implement a new storage type for non-bonded pair interactions #4216
KaiSzuttor
started this conversation in
Ideas
Replies: 1 comment 5 replies
-
Can you explain why cantor pairing? I think the current hash function is better suited for the typical use case, due to better locality. Currently the implementation looks like this: inline IA_parameters *get_ia_param(int i, int j) {
return &ia_params[Utils::upper_triangular(std::min(i, j), std::max(i, j),
max_seen_particle_type)];
} |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Idea: use the Cantor pairing bijective function to map from type pair to the index of the pair interaction in a vector of tuples of interactions.
Beta Was this translation helpful? Give feedback.
All reactions