Interface Documentation
Version: invalid
io.hh
Go to the documentation of this file.
1 /*
2  @@@@@@@@ @@ @@@@@@ @@@@@@@@ @@
3  /@@///// /@@ @@////@@ @@////// /@@
4  /@@ /@@ @@@@@ @@ // /@@ /@@
5  /@@@@@@@ /@@ @@///@@/@@ /@@@@@@@@@/@@
6  /@@//// /@@/@@@@@@@/@@ ////////@@/@@
7  /@@ /@@/@@//// //@@ @@ /@@/@@
8  /@@ @@@//@@@@@@ //@@@@@@ @@@@@@@@ /@@
9  // /// ////// ////// //////// //
10 
11  Copyright (c) 2016, Triad National Security, LLC
12  All rights reserved.
13  */
14 #pragma once
15 
18 #include "io/backend.hh"
19 
20 namespace flecsi::io {
21 
22 #ifdef DOXYGEN // these are implemented per-backend
23 typedef unspecified hdf5_t, hdf5_region_t, launch_space_t;
24 #endif
25 
26 // TODO: make these member functions
27 hdf5_t init_hdf5_file(const char *, int num_files);
28 bool create_hdf5_file(hdf5_t &, int file_idx);
29 bool open_hdf5_file(hdf5_t &, int file_idx);
30 bool close_hdf5_file(hdf5_t &);
31 bool create_datasets_for_regions(hdf5_t & hdf5_file, int file_idx);
32 
33 bool write_string_to_hdf5_file(hdf5_t &,
34  int file_idx,
35  const char * group_name,
36  const char * dataset_name,
37  const std::string &,
38  size_t);
39 bool read_string_from_hdf5_file(hdf5_t &,
40  int file_idx,
41  const char * group_name,
42  const char * dataset_name,
43  std::string &);
44 
45 void add_regions(hdf5_t &, std::vector<hdf5_region_t> &);
46 void generate_hdf5_files(hdf5_t &);
47 
48 void checkpoint_data(hdf5_t &,
49  launch_space_t,
50  std::vector<hdf5_region_t> &,
51  bool attach);
52 void recover_data(hdf5_t &,
53  launch_space_t,
54  std::vector<hdf5_region_t> &,
55  bool attach);
56 
57 #ifdef DOXYGEN
58 struct io_interface_t {
59  void add_process_topology(hdf5_t &);
60  void checkpoint_process_topology(hdf5_t &);
61  void checkpoint_index_topology_field(hdf5_t &, const field_reference_t &);
62  void recover_process_topology(hdf5_t &);
63  void recover_index_topology_field(hdf5_t &, const field_reference_t &);
64 };
65 #endif
66 
67 } // namespace flecsi::io
Definition: backend.hh:23