I’m interested in using the function WorkParallelForN which exists in the pixar openusd c++ api, documented here Universal Scene Description: Work : Multi-threaded Dispatch and here Universal Scene Description: pxr/base/work/loops.h File Reference
I’ve tried to track down the equivalent function in the python api by following the advice in the page Translating Between the OpenUSD C++ and Python APIs — Omniverse USD
Running the code
from pxr import Work
print(dir(Work))
Gives the following output:
['GetConcurrencyLimit', 'GetPhysicalConcurrencyLimit', 'HasConcurrency', 'SetConcurrencyLimit', 'SetConcurrencyLimitArgument', 'SetMaximumConcurrencyLimit', '__MFB_FULL_PACKAGE_NAME', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__']
Which indicates to me I might be in the right area but I can’t track down any of the actual functions used to run parallel loops. I’ve also looked at the documentation Work module — Omniverse Kit which shows some overlap between the modules but doesn’t explain how to implement a parallel loop.
Any advice on how to use the function WorkParallelForN() from the C++ api would be greatly appreciated.
TIA,
Tim