[Sparse] Make ti.append() support dynamic snode with **multiple child** #1282
Labels
c++
C++ engineering related
discussion
Welcome discussion!
feature request
Suggest an idea on this project
Concisely describe the proposed feature
Currently
ti.append(snode, n, val)
only supports dynamic snode with exactly one child.I think why @yuanming-hu do such design is limited by the fact that it's hard to make
val
extendable.Describe the solution you'd like (if any)
Instead of passing
val
to append, how about this: we just allocate a slot for it, but not initialize it withval
. The initialization can be done later since append is atomic.Old API:
New API:
Additional comments
I found this issue when developing https://github.com/taichi-dev/taichi_three with a OpenGL-alike API
glQuad
andglSphere
, which needs to dynamically append triangle vertices.(Sorry, I can't help but show off the cool works in Tai3D :)
We may want to start solving this issue after #1256 merged to prevent conflict.
The text was updated successfully, but these errors were encountered: