taichi icon indicating copy to clipboard operation
taichi copied to clipboard

How to use hash snode

Open Yihao-Shi opened this issue 2 years ago • 5 comments

It seems that Taichi docs missing how to use hash snode. I'm wondering if I can get an example about 'hash snode'. Thank you in advance!

Yihao-Shi avatar Aug 31 '22 02:08 Yihao-Shi

The current version of Taichi doesn't support the hash SNode. It was in the original Taichi paper and we plan to recover it in the future. Could you briefly introduce your use case so that we can try to find some alternative solution for now? Thanks.

strongoier avatar Sep 01 '22 07:09 strongoier

BTW you could also use the pointer SNode for now. You only need to activate those keys which are inserted into the hash table.

strongoier avatar Sep 05 '22 12:09 strongoier

Thanks for your suggestion. However, I found pointer SNode performs much slower than dense SNode in traversal cycle, which is another troubles. Or the performance of pointer SNode depends on how to set up SNode, is there have some strategies to accelerate it? Thank you in advance!

Yihao-Shi avatar Sep 05 '22 12:09 Yihao-Shi

Is there any pattern regarding the keys to activate?

strongoier avatar Sep 06 '22 03:09 strongoier

For example, I use a hash value (pairing function) to identify the contact pair between particle i and particle j. Once particle i and particle j are in contact, the keys activate. The most important is, the system have about 900,000 particles, thus the hash value may become very large.

Yihao-Shi avatar Sep 08 '22 06:09 Yihao-Shi

Just going to jump in here as I had a similar question:

As I understand it Hash SNodes aren't implemented (the reference to them in the docs might be an oversight), but how can you construct a sparse multidimensional structure then? The dynamic SNode can only be used for a single dimension right? So is there currently no way to create a VDB-like structure? The original paper describes one as such:

root.hash(ijk, 32).dense(ijk, 16).pointer().dense(ijk, 8).place(u, v, w);

What should be done to create a sparse, multi-level, three-dimensional and unbounded structure? Any alternatives? Also, why was the hashnode ever removed?

jungerm2 avatar Apr 07 '23 17:04 jungerm2

@strongoier, any ideas?

jungerm2 avatar Apr 19 '23 21:04 jungerm2