source: XIOS/dev/dev_trunk_omp/src/workflow_graph.hpp @ 1670

Last change on this file since 1670 was 1670, checked in by yushan, 5 years ago

MARK: branch merged with trunk @1663. Generate one static graph for each output file

File size: 2.1 KB
Line 
1#ifndef __WORKFLOW_GRAPH_HPP__
2#define __WORKFLOW_GRAPH_HPP__
3
4#include "xios_spl.hpp"
5#include "field.hpp"
6#include "garbage_collector.hpp"
7
8namespace xios
9{
10
11  class CWorkflowGraph
12  {
13
14    friend class CGraphviz;
15
16    public:
17
18      CWorkflowGraph();
19
20      /*! Map between fields identified by its id and their filters identified by an integer.
21       * It is filled up during reconstruction of a workflow (in function CField::buildFilterGraph()).
22      */
23      static std::unordered_map < StdString, std::unordered_map <StdString, vector <int> >    >  *mapFieldToFilters_ptr;
24      #pragma omp threadprivate(mapFieldToFilters_ptr)
25
26      /*! Map between filter ids and filter types.
27       * It is filled up during reconstruction of a workflow (in function CField::buildFilterGraph()).
28       */
29      static std::unordered_map < StdString, std::unordered_map <int, StdString>  >   *mapFilters_ptr;
30      #pragma omp threadprivate(mapFilters_ptr)
31
32      /*! Map between filters and timestamps.
33       * Timestamps are added into the map at the exit of a filter (in function COutputPin::onOutputReady)
34       */
35      static std::unordered_map < StdString, std::unordered_map <int, vector<Time> >  > *mapFilterTimestamps_ptr;
36      #pragma omp threadprivate(mapFilterTimestamps_ptr)
37
38      /*! List of timestamps.
39       * Timestamps are added at the exit of a filter (in function COutputPin::onOutputReady)
40       */
41      static std::unordered_map< StdString, set<Time> > *timestamps_ptr;
42      #pragma omp threadprivate(timestamps_ptr)
43
44      static StdString my_filename;
45      #pragma omp threadprivate(my_filename)
46
47    private:
48
49      //! List of fields marked for visualizing of their workflow
50      static vector <StdString> fields;
51
52      //! List of connected filters for fields for visualizing of their workflow
53      static vector <StdString> filters;
54
55      //! Fields to filters connectivity
56      static vector <pair<int, int> > fieldsToFilters;
57
58      static void buildStaticWorkflow();
59      static void buildStaticWorkflow_forfile(StdString filename);
60      static void showStaticWorkflow();
61
62
63  };
64}
65
66#endif
67
Note: See TracBrowser for help on using the repository browser.