Page MenuHome

BLI_disjoint_set: Use template and const
ClosedPublic

Authored by Iliya Katueshenock (Moder) on Nov 12 2022, 2:38 AM.

Details

Summary

Right now the DisjointSet implementation only applies in 2 places

  • These are two geometry nodes. Except Cycles.

The specificity of nodes is to use int instead of int64_t for indexes, to save memory.
Since nodes are currently the only user of this implementation, it makes sense to
make it a template so that it can be used both in nodes, with memory savings, and
in other modules, if necessary, with an acceptable size for them.

Diff Detail

Repository
rB Blender

Event Timeline

Iliya Katueshenock (Moder) requested review of this revision.Nov 12 2022, 2:38 AM
Iliya Katueshenock (Moder) created this revision.
Iliya Katueshenock (Moder) edited the summary of this revision. (Show Details)
source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc
260

Are these type casts necessary?

Iliya Katueshenock (Moder) added inline comments.
source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc
260

I don't know why I thought they were int64_t ..., no, it's not needed here

Iliya Katueshenock (Moder) marked an inline comment as done.Nov 12 2022, 11:38 AM
This revision is now accepted and ready to land.Nov 12 2022, 2:24 PM