I have been trying to find information on multi-threading support in SU C SDK, but so far without success. So I’m posting my question here: are SU C SDK functions in general re-entrant (i.e. can I call them from multiple threads without protecting them with any kind of synchronization mechanism)? If some are, and some aren’t, then it would be nice to now which are which.
I have done some experiments with calling SUFaceGetFrontMaterial, SUFaceGetUVHelper, SUMeshHelperCreateWithUVHelper, SUMeshHelperGetNumVertices, SUMeshHelperGetVertices, SUMeshHelperGetNormals, etc. on separate faces (while also providing separate instances for material references, vertex and normal arrays, etc.) from multiple threads in parallel without any issues, but I would like to know if this is safe by design or I’m just being lucky so far.
The reason for doing what I’m trying to do is speed. According to my profiling results, the triangulation of faces in SU (in particular, calling the SUMeshHelperCreateWithUVHelper function) is taking quite a bit of time, and parallelizing this operation over multiple faces speeds things up considerably (30% to 40% in my use case).
Thanks,
Lev