20 #ifdef KRATOS_SMP_OPENMP
50 #ifdef KRATOS_SMP_OPENMP
51 omp_init_lock(&mLock);
61 #ifdef KRATOS_SMP_OPENMP
62 omp_destroy_lock(&mLock);
79 #ifdef KRATOS_SMP_CXX11
81 #elif KRATOS_SMP_OPENMP
94 #ifdef KRATOS_SMP_CXX11
96 #elif KRATOS_SMP_OPENMP
97 omp_unset_lock(&mLock);
109 #ifdef KRATOS_SMP_CXX11
110 return mLock.try_lock();
111 #elif KRATOS_SMP_OPENMP
112 return omp_test_lock(&mLock);
123 #ifdef KRATOS_SMP_CXX11
124 mutable std::mutex mLock;
125 #elif KRATOS_SMP_OPENMP
126 mutable omp_lock_t mLock;
This class defines and stores a lock and gives an interface to it.
Definition: lock_object.h:42
LockObject(LockObject const &rOther)=delete
Copy constructor.
LockObject & operator=(LockObject const &rOther)=delete
Assignment operator.
void UnSetLock() const
Definition: lock_object.h:102
LockObject() noexcept
Default constructor.
Definition: lock_object.h:48
void lock() const
Definition: lock_object.h:77
~LockObject() noexcept
Destructor.
Definition: lock_object.h:59
bool try_lock() const
Definition: lock_object.h:107
void unlock() const
Definition: lock_object.h:92
void SetLock() const
Definition: lock_object.h:87
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
namespace KRATOS_DEPRECATED_MESSAGE("Please use std::filesystem directly") filesystem
Definition: kratos_filesystem.h:33