I need to speed up an embarrassingly parallel chunk of computations within a C++ plug-in. Is it possible to use a multithreading library like TBB with the Rhino SDK?
Note that within the parallelized code there are no Rhino geometries being instantiated.
I’ve seen this is available in C# through Task Parallel Library, but not sure about C++.
If you are using C++11 >= you don’t have to rely on libraries, check this out: https://www.geeksforgeeks.org/multithreading-in-cpp/
But I don’t have any experience with the Rhino C++ SDK so I am completely ignorant on how to go about this one though.
If you are doing algorithms that can be parallelized, why not look into OpenCL, I am a CUDA guy myself but I guess you wouldn’t wan’t to loose all the AMD users. I guess you could also use Compute Shaders from OpenGL but you would also loose audience as they are only supported from version >= 4.3