Peano
Loading...
Searching...
No Matches
TaskEnumerator.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5
6#include "tarch/Enumerator.h"
8#include <set>
9#include <string>
10
11
12namespace tarch {
13 namespace multicore {
14 class TaskEnumerator;
15 }
16}
17
42 public:
43 static constexpr int NoNumber = -1;
44
46 void reset();
47
59 int getNumber();
60
67 void releaseNumber( int value );
68
72 int size() const;
73
74 std::string toString() const;
75
76 private:
82 static std::vector< tarch::Enumerator* > _enumerator;
84
96};
97
Log Device.
Definition Log.h:517
Rank-global enumerator for tasks.
static tarch::multicore::MultiReadSingleWriteSemaphore & _enumeratorSequenceSemaphore()
We use a method instead of a member variable so that thhe static semaphore is is guaranteed to be ini...
static std::vector< tarch::Enumerator * > _enumerator
int _enumeratorNumber
Number of enumerator that's tied to this instance.
int size() const
Number of numbers handed out so far.
int getNumber()
Get a new task number.
static tarch::logging::Log _log
void releaseNumber(int value)
Release a task number.
std::string toString() const
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
Definition accelerator.h:19