concurrent EXR output #3502
Replies: 1 comment 1 reply
-
Unfortunately, the underlying OpenEXR library itself has no provision for multiple threads to simultaneously write tiles to the same file. In fact, I'm not aware of any of our underlying image file format libraries that allow this, so there in turn are not any provisions in the OIIO API to do so, since it couldn't be implemented in any practical way. (And if you think about it a bit, you can see why it would be exceptionally difficult: unless you were writing uncompressed data or using a fixed-ratio compression method -- that is, for all the ordinary compression types where each tile could have a distinct compressed size -- the different threads wouldn't know where in the file to write their tile, without knowing exactly how big all the previous tiles were. That said, it is fine to have multiple threads simultaneously writing to different files. And also, one thread writing many tiles to a file can still use multithreading (in short, the openexr library already knows how to use threads to parallelize the compression of several tiles simultaneously). |
Beta Was this translation helpful? Give feedback.
-
Hello guys,
Just wondering if an EXR output (at least randomY tiled output) can be multithreaded ?
Multiple threads calling simultaneously write_tiles(...) for example.
Thanks !
Fabien
Beta Was this translation helpful? Give feedback.
All reactions