/*******************************************************************************
*
* TRIQS: a Toolbox for Research in Interacting Quantum Systems
*
* Copyright (C) 2011 by O. Parcollet
*
* TRIQS is free software: you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* TRIQS. If not, see .
*
******************************************************************************/
#include "./common.hpp"
#include "./src/h5/array_stack.hpp"
#include "./src/h5/simple_read_write.hpp"
#include
#include "./src/asserts.hpp"
using std::cout; using std::endl;
using namespace triqs::arrays;
using namespace triqs;
template < class T>
void test(std::string filename, T init) {
H5::H5File file( filename.c_str(), H5F_ACC_TRUNC );
h5::group top (file);
const size_t N = 12, bufsize = 5, d= 2;
array A(d,d+1);
array A_stack_keep(N,d,d+1), A_stack_compare(N,d,d+1);
array B(d);
array B_stack_keep(N,d), B_stack_compare(N,d);
T C;
array C_stack_keep(N), C_stack_compare(N);
//h5::array_stack SA( file, "A", A.shape() , bufsize);
//h5::array_stack SB( top, "B", B.shape() , bufsize);
//h5::array_stack SC( top, "C", mini_vector() , bufsize);
array_stack< array > SA( top, "A", A.shape() , bufsize);
array_stack< array > SB( top, "B", B.shape() , bufsize);
array_stack< T> SC( top, "C", bufsize);
//h5::array_stack< T> SC( top, "C", mini_vector() , bufsize); // also valid ...
//h5::array_stack< array > SB2( top, "B", bufsize); // does not compile
for (size_t u = 0; u(1,2) );
}