https://github.com/OpenImageIO/oiio/pull/224

Add global attribute()/getattribute for OIIO-wide options. First one: "threads"
set number of threads for things that can spawn threads to parallelize
(such as certain ImageBuf algorithms and OpenEXR multi-tile encode/decode).
Set this in the appropriate command-line utilities and also standardize on
--threads as the command line argument across all the utils.

The impetus from this was a suggest from Chris Kulla that we should not
automatically instruct OpenEXR to use many threads. But I didn't want
to lose this ability entirely, and the ability to set a nmber of threads
to be spawned pops up in many places, and generalizes to many potential
future cases of wanting to set various global options, for which we did
not previously have an API call. Now we do, in the form of attribute()
and getattribute(), syntax lifted directly from TextureSystem,
ImageCache, and OSL. But these global ones are not part of any class
(and do not take the place of class-specific ones such as
TextureSystem::attribute()), but rather are in the outer OIIO_NAMESPACE.

--
Larry Gritz
[email protected]


_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to