Blender Git Loki

Git Commits -> Revision a353aeb

Revision a353aeb by Hans Goudey (cycles_texture_cache)
May 6, 2021, 09:25 (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: a353aeb53275bb72acb83061a68b4babefb4045d
Parent Commit: 3391e67
Committed By: Stefan Werner
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)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021