TraverseParallel.h 2.09 KB
Newer Older
1
2
3
4
5
6
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
7
// ==  TU Dresden                                                            ==
8
// ==                                                                        ==
9
10
11
// ==  Institut fr Wissenschaftliches Rechnen                               ==
// ==  Zellescher Weg 12-14                                                  ==
// ==  01069 Dresden                                                         ==
12
13
14
15
// ==  germany                                                               ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
16
// ==  https://gforge.zih.tu-dresden.de/projects/amdis/                      ==
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// ==                                                                        ==
// ============================================================================

/** \file TraverseParallel.h */

#ifndef AMDIS_TRAVERSEPARALLEL_H
#define AMDIS_TRAVERSEPARALLEL_H

#ifdef _OPENMP

#include "OpenMP.h"
#include "Traverse.h"
#include <vector>

namespace AMDiS {

  /** \ingroup Traverse
   * \brief
   */
  class TraverseParallelStack 
  {
  public: 
39
    TraverseParallelStack(int nThreads = 0, int mode = 0);
40
41
42

    ~TraverseParallelStack();

43
    ElInfo* traverseFirst(Mesh *mesh, int level, Flag fillFlag);
44

45
    ElInfo* traverseNext(ElInfo* elInfoOld);
46
47

  private:
48
    /// Number of threads using the stack in parallel.
49
    int nThreads;
50

51
52
    int parallelMode;

53
    std::vector<TraverseStack*> stacks;
54
55
56
57
58
59
60
61
  };

}

#endif  // _OPENMP

#endif  // AMDIS_TRAVERSEPARALLEL_H