I have this complex function in C++ that I'm unable to modify. It was written to take in an array, do some math, and output an array.
It is currently structured in a non-parallel way.
For ease of use, it is being exported into Python with Pybind11.
I'm trying to find ways of speeding up the processing so I've looked into things like Thread() and ProcessPoolExecutor but I'm not sure if putting a C++ function into those will then be able to take advantage of it.
Perhaps if the C++ function would take in a float and return a float, then I can cycle through the array in Python and that would be able to utilize ProcessPoolExecutor.
Is my understanding correct? Do y'all have any other ideas?
I've tried writing some C++ functions and wrapping them in Pybind11 but I'm skeptical of the benchmark times - that my efforts to parallelize them aren't really valid.
I was going to try to follow this example of image flipping but put the actual processing in C++ like in this tutorial.
This is more of a theoretical problem than a specific error message.