mardi 27 novembre 2018

Is it safe to use a C++ mutex in openmp code

Is it safe to use a C++11 mutex inside openMP 4.5 code? The idea is that I am using a logging library which protects each std::cout using a C++ mutex so that the outputs to cout are not scrambled when running with multiple threads. Inside my openMP code I may want to use this logging library to print some messages. Is it safe to do so?

Aucun commentaire:

Enregistrer un commentaire