Blender Git Loki

Git Commits -> Revision efb86b7

Revision efb86b7 by Bastien Montagne (master)
November 23, 2017, 20:14 (GMT)
Add a new parallel looper for MemPool items to BLI_task.

It merely uses the new thread-safe iterators system of mempool, quite
straight forward.

Note that to avoid possible confusion with two void pointers as
parameters of the callback, a dummy opaque struct pointer is used
instead for the second parameter (pointer generated by iteration over
mempool), callback functions must explicitely convert it to expected
real type.

Also added a basic gtest for this new feature.

Commit Details:

Full Hash: efb86b712d540e132fb68058b7a7fba0fc8be247
Parent Commit: b84e6df
Lines Changed: +176, -0

1 Added Path:

/tests/gtests/blenlib/BLI_task_test.cc (+76, -0) (View)

3 Modified Paths:

/source/blender/blenlib/BLI_task.h (+11, -0) (Diff)
/source/blender/blenlib/intern/task.c (+87, -0) (Diff)
/tests/gtests/blenlib/CMakeLists.txt (+2, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021