wrapper for OpenMP lock routines. More...
#include <Lock.hpp>
Classes | |
class | Acquire |
acquires the lock when constructed and releases when destroyed More... | |
wrapper for OpenMP lock routines.
This class can be used to prevent data races by OpenMP threads. It contains an OpenMP lock variable. To acquire (aka set) the lock, construct an Acquire
object from it. When the Acquire
object is destroyed, the lock will be released (unset). If Hexed is not compiled with OpenMP, this class does nothing. Use like this: