Is it safe to use a shared_ptr inside an openMP parallel block in any way? A shared_ptr maintains atomicity of reference count through the use of an atomic and in general it is my understanding that we should not be mixing C++11 multithreading mechanisms with openMP. So by definition it seems to me that accessing a shared_ptr anywhere inside an openmp pragma block (even for simple const read operations) could cause problems. Or this is not the case?
Aucun commentaire:
Enregistrer un commentaire