Blender Git Commit Log

Git Commits -> Revision 93147ca

November 11, 2019, 09:34 (GMT)
BLI_task: Initial implementation of pooled threaded index range iterator.

This code allows to push a set of different operations all based on
iterations over a range of indices, and then process them all at once
over multiple threads.

This is mainly interesting for relatively low amount of individual
tasks, as expected.

E.g. performance tests on a 32 threads machine, for a set of 10
different tasks, shows following improvements when using pooled version
instead of ten sequential calls to `BLI_task_parallel_range()`:

| Num Items | Sequential | Pooled | Speed-up |
| --------- | ---------- | ------- | -------- |
| 10K | 365 us | 138 us | 2.5 x |
| 100K | 877 us | 530 us | 1.66 x |
| 1000K | 5521 us | 4625 us | 1.25 x |

Differential Revision: https://developer.blender.org/D6189

Commit Details:

Full Hash: 93147cab0350151a376a65d244dc5b275a0baa3e
Parent Commit: f0bee88
Lines Changed: +545, -76

4 Modified Paths:

/source/blender/blenlib/BLI_task.h (+16, -3) (Diff)
/source/blender/blenlib/intern/task.c (+321, -71) (Diff)
/tests/gtests/blenlib/BLI_task_performance_test.cc (+88, -2) (Diff)
/tests/gtests/blenlib/BLI_task_test.cc (+120, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021