Peano
Loading...
Searching...
No Matches
TaskEnumerator.h
Go to the documentation of this file.
1// This file is part of the SWIFT2 project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
6#include "tarch/la/Vector.h"
8
11
12#include <map>
13
14namespace swift2 {
15 class TaskEnumerator;
16}
17
18
54 public:
55 TaskEnumerator() = default;
56
92 static void lockResources( const tarch::la::Vector<TwoPowerD,int>& numbers );
93
102
103 private:
108 static std::map< int, tarch::multicore::BooleanSemaphore* > _resources;
109
123
125
132 static void insertNumber(int number);
134};
135
Task enumerator for Swift 2.
static std::map< int, tarch::multicore::BooleanSemaphore * > _resources
Each task is tied to a resource, i.e.
static void insertNumber(int number)
Create a new number.
static void insertNumbers(const tarch::la::Vector< TwoPowerD, int > &numbers)
static ResourcesSemaphore _resourcesSemaphore
static void unlockResources(const tarch::la::Vector< TwoPowerD, int > &numbers)
Free resources.
static void lockResources(const tarch::la::Vector< TwoPowerD, int > &numbers)
Lock resources.
Rank-global enumerator for tasks.
This file is part of the SWIFT 2 project.
Simple vector class.
Definition Vector.h:159