[Gimp-developer] GEGL_THREADS

GEGL master can now be thread-accelerated. Different approaches have
been tried; the approach that first yielded promising results was
parallelizing each individual operations process call. Most GEGL
operations now have threading support; some are opted out of the
automatic threading provided by the base classes by setting
operation_class->threaded = FALSE in their respective class_init

The original plan was making each thread do a full graph processing,
but initial profiling of that approach gave worse results than doing
it individually per op. Doing it individually per op has the added
benefit that each op can be free to use different parallelization
techniques, OpenMP, OpenCL or thread-pool provided by GEGLs base op

It is not enabled by default yet; since it still might be crashing or
giving wrong results. To test it, run GEGL/start GIMP with
GEGL_THREADS set to the number of threads to use and GEGL_USE_OPENCL
to "no" in the environment (with this threaded processing; we probably
do not want to use on CPU based OpenCL implementations). The full
environment I currently test my GIMP with is:


Some of the ops with ->threading=FALSE in class_init are implemented
in non-thread-safe ways or rely on the wrong arguments for determining
their geometry.

There is room for improvement in re-arranging/adding more local locks
in GeglBuffer. A bigger improvement might be adding new API for
threaded buffer iteration; combined with refactoring of how threading
is done at for point-filter/-composer /-render/transform sub-classes


(please continue this thread on gegl-developer-list and not gimp-developer)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]