PhoenixGenerator  2.0.0
Set of tools to generate code
main.cpp
Go to the documentation of this file.
1 
2 /***************************************
3  Auteur : Pierre Aubert
4  Mail : pierre.aubert@lapp.in2p3.fr
5  Licence : CeCILL-C
6 ****************************************/
7 
8 #include <iostream>
9 #include <vector>
10 #include "phoenix_assert.h"
11 #include "phoenix_vector_split.h"
12 
15  std::vector<int> vecInt;
16  for(size_t i(0lu); i < 10lu; ++i){
17  vecInt.push_back((int)i);
18  }
19  std::vector<std::vector<int> > vecVecInt;
20  phoenix_vector_split(vecVecInt, vecInt, 2lu);
21  for(int i(0); i < 5; ++i){
22  phoenix_assert(vecVecInt[0][i] == 2*i);
23  phoenix_assert(vecVecInt[1][i] == 2*i + 1);
24  }
25 }
26 
29  std::vector<int> vecInt;
30  for(size_t i(0lu); i < 2lu; ++i){
31  vecInt.push_back((int)i);
32  }
33 
34  std::vector<std::vector<int> > vecVecInt;
35  phoenix_vector_split(vecVecInt, vecInt, 6lu);
36  for(int i(0); i < 1; ++i){
37  phoenix_assert(vecVecInt[0][i] == 2*i);
38  phoenix_assert(vecVecInt[1][i] == 2*i + 1);
39  }
40 }
41 
42 int main(int argc, char** argv){
45  return 0;
46 }
47 
48 
int main(int argc, char **argv)
Definition: main.cpp:19
void testVectorSplit()
Test the string filename function.
Definition: main.cpp:14
void testVectorSplit2()
Test the string filename function.
Definition: main.cpp:28
#define phoenix_assert(isOk)
void phoenix_vector_split(std::vector< std::vector< T > > &vecVecOutput, const std::vector< T > &vecInput, size_t nbPart)
Split a list in a list of lists, keep the order of the input file if the output is used for std::thre...