rgoldade / AdaptiveViscositySolver

Source code for "An Adaptive Variational Finite Difference Framework for Efficient Symmetric Octree Viscosity" (SIGGRAPH 2019)
https://cs.uwaterloo.ca/~rgoldade/adaptiveviscosity/
86 stars 9 forks source link

Set array size before concatenating #5

Closed rgoldade closed 5 years ago

rgoldade commented 5 years ago

It is significantly faster to pre-allocate an array size once instead of re-sizing during each concat step. This will provide a significant performance improvement when building the octree (i.e., compiling lists built in parallel down to a single list).