Ice Sheet System Model  4.18
Code documentation
CoDiPackGlobal.h
Go to the documentation of this file.
1 /*
2  * CoDiPackGlobal.h
3  *
4  * Created on: Jul 20, 2016
5  * Author: a_h_ck
6  */
7 
8 #ifndef SRC_C_TOOLKITS_CODIPACK_CODIPACKGLOBAL_H_
9 #define SRC_C_TOOLKITS_CODIPACK_CODIPACKGLOBAL_H_
10 
11 #ifdef HAVE_CONFIG_H
12  #include <config.h>
13 #else
14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
15 #endif
16 
17 #if defined(_HAVE_CODIPACK_)
18 
19 #include <iostream>
20 #include <vector>
21 
22 struct CoDi_global {
23  std::vector<int> input_indices;
24  std::vector<int> output_indices;
25 
26  void print(std::ostream& out) const {
27  out << "-------------------------------------\nCoDi_global:\n in = [ ";
28  for(auto& in_index : input_indices) {
29  out << in_index << " ";
30  }
31  out << "]\n out = [ ";
32  for(auto& out_index : output_indices) {
33  out << out_index << " ";
34  }
35  out << "]\n-------------------------------------\n";
36  }
37 };
38 
39 #endif /* _HAVE_CODIPACK_ */
40 #endif /* SRC_C_TOOLKITS_CODIPACK_CODIPACKGLOBAL_H_ */