Blender Git Loki
Git Commits -> Revision 1d7ee50
Revision 1d7ee50 by Hans Goudey (master) May 3, 2021, 13:00 (GMT) |
Geometry Nodes: Parallelize attribute nodes This commit significantly speeds up many of the attribute nodes when multiple threads are available in linear situations when parallelism cannot be achieved elsewhere. See the differential for a table of timing comparisons tested on a Ryzen 3700x. For an attribute with 4 million elements, the nodes were about 3 to 9 times faster. The changes are not exhaustive, other nodes could still be parallelized in the future. Also, it would be possible to further optimize the grain size in `parallel_for`, but I'd rather make sure it isn't too small. I tested some different values, but also relied on intuition-- increasing grain size for less complex operations and vice versa. Differential Revision: https://developer.blender.org/D11139 |
Commit Details:
Full Hash: 1d7ee50fef71a2baaa2ebcfb8409b5eb33d1bc23
Parent Commit: 2b46606
Lines Changed: +274, -195
8 Modified Paths:
/source/blender/nodes/geometry/nodes/node_geo_align_rotation_to_vector.cc (+58, -53) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc (+7, -3) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_map_range.cc (+57, -35) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc (+17, -9) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_mix.cc (+30, -22) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_randomize.cc (+36, -23) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_sample_texture.cc (+12, -8) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_vector_math.cc (+57, -42) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_color_ramp.cc (+7, -3) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_map_range.cc (+57, -35) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc (+17, -9) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_mix.cc (+30, -22) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_randomize.cc (+36, -23) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_sample_texture.cc (+12, -8) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_attribute_vector_math.cc (+57, -42) (Diff)