aboutsummaryrefslogtreecommitdiff
path: root/src/Panda/ArrayGroup.h
blob: 0cd741b581d4a672889998866e7afac5f24f76dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef Arraygroup_dot_h
#define Arraygroup_dot_h

class Array;
class ArrayLayout;
#include "List.h"
#include "definitions.h"

class ArrayGroup {
 protected:
  char             *name_;           /* Name of the arraygroup */
  int              num_of_arrays_;   /* Number of arrays in group */
  List             *list_;           /* List of arrays */
  int              io_strategy_;

  /* If all the arrays have the same io and compute node layouts */
  Boolean          common_layouts_;
  int              common_layout_rank_;
  ArrayLayout      *compute_layout_;
  Distribution     *compute_distribution_;
  ArrayLayout      *io_layout_;
  Distribution     *io_distribution_;

 
  int              group_io_count_;
  int              read_io_count_;
  int              checkpoint_count_;
  int              op_type_;


  Boolean          interleaved_;     
  Boolean          simulate_;
  Boolean          verify_;

  void             do_init();
  void             delete_arrays();
  void             assign_id();
  void             pack_arrays(int**, Boolean);

 public:

                   ArrayGroup();
                   ArrayGroup(char *);
  virtual         ~ArrayGroup();
  void             insert(Array*);
  void             pack(int**, int*);
  void             unpack(int**);
  void             timestep();
  void             general_write();
  void             checkpoint();
  void             restart();
  void             read_timestep();
  void             general_read();
  Array           *find_array(int);
  int              op_type();
  void             set_simulate();
  void             reset_simulate();
  void             set_simulate_mode();
  void             reset_simulate_mode();
  Boolean          simulate();
  Boolean          verify();
  void             set_verify();
  void             reset_verify();
  void             set_verify_mode();
  void             reset_verify_mode();
  void             unpack_arrays(int**);
  void             init_array_info(int*,int**);
  void             set_io_strategy(int);
  int              io_strategy();
  int              num_of_arrays();
  void		   clear();
};

#endif