Peano
Loading...
Searching...
No Matches
Lock.h
Go to the documentation of this file.
1// Copyright (C) 2009 Technische Universitaet Muenchen
2// This file is part of the Peano project. For conditions of distribution and
3// use, please see the copyright notice at www.peano-framework.org
4#pragma once
5
6
7namespace tarch {
8 namespace mpi {
9 class BooleanSemaphore;
10 class Lock;
11 }
12}
13
14
21 private:
24 public:
25 Lock( tarch::mpi::BooleanSemaphore& semaphore, bool aquireLockImmediately = true );
26 ~Lock();
27
28 void lock();
29 void free();
30};
31
Boolean semaphore across MPI ranks.
Create a lock around a boolean semaphore region.
Definition Lock.h:20
void free()
Definition Lock.cpp:29
void lock()
Definition Lock.cpp:22
BooleanSemaphore & _semaphore
Definition Lock.h:22
bool _lockIsAquired
Definition Lock.h:23
Lock(tarch::mpi::BooleanSemaphore &semaphore, bool aquireLockImmediately=true)
Definition Lock.cpp:6
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
Definition accelerator.h:19