2016.01.25 20:21 "Re: [Tiff] OpenMP enabled libtiff", by Aaron Boxer
On Mon, Jan 25, 2016 at 2:18 PM, Bob Friesenhahn < firstname.lastname@example.org> wrote:
> Is anyone interested in having OpenMP support in libtiff? >> Is this feasible? I am planning on adding this feature for another
>> I am working on, so I am trying to gauge interest.
What would the OpenMP support do? Few operations in libtiff are CPU bound. Only compressed formats consume noticeable CPU.
I believe SSDs perform well under multiple reads, but this would have to be carefully bench-marked, of course.
It is useful for OpenMP (or any other sort of threading) to be used by an application using libtiff to perform parallel operations. For example, reading or writing several strips/tiles at once.
Currently there is no locking in libtiff and no support for thread-specific data (TSD). There are just a few static/global variables. Features like strip-chopping likely cause serious issues for threading since they require storing intermediate state.
If support for any necessary locking or TSD is added, then it should be added in a generic way so that the locks and TSD APIs are provided by the invoking environment and don't need to be baked into libtiff.
Thanks. One easy way might be to partition ahead of time which strips are processed by which threads. I will take a look at the code and see if I can come up with a simple way of doing this.
> Bob Friesenhahn
> email@example.com, http://www.simplesystems.org/users/bfriesen/
> GraphicsMagick Maintainer, http://www.GraphicsMagick.org/