Peano
Loading...
Searching...
No Matches
parallel.cpp
Go to the documentation of this file.
1#include "parallel.h"
2
3#include "tarch/logging/Log.h"
4#include "tarch/mpi/Rank.h"
5
6
7int peano4::parallel::getTaskType(const std::string& className) {
8 static int taskTypeCounter = -1;
9 taskTypeCounter++;
10
11 #if PeanoDebug>0
12 if (tarch::mpi::Rank::getInstance().isGlobalMaster() ) {
13 std::cout << "assign task " << className << " id " << taskTypeCounter << std::endl;
14 }
15 #endif
16
17 return taskTypeCounter;
18}
static Rank & getInstance()
This operation returns the singleton instance.
Definition Rank.cpp:539
int getTaskType(const std::string &className)
Get unique number (id) for task.
Definition parallel.cpp:7