libpnicore
arrays.hpp
1 //
2 // (c) Copyright 2011 DESY, Eugen Wintersberger <eugen.wintersberger@desy.de>
3 //
4 // This file is part of libpnicore.
5 //
6 // libpnicore is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // libpnicore is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with libpnicore. If not, see <http://www.gnu.org/licenses/>.
18 //
19 // ============================================================================
20 //
21 // Created on: Aug 5, 2012
22 // Author: Eugen Wintersberger <eugen.wintersberger@desy.de>
23 //
24 #pragma once
25 
26 #include <vector>
27 #include <array>
28 #include "arrays/mdarray.hpp"
29 #include "arrays/array_view.hpp"
30 #include "arrays/array_factory.hpp"
31 #include "arrays/slice.hpp"
32 #include "arrays/array_arithmetic.hpp"
33 #include "arrays/index_iterator.hpp"
34 
35 
36 namespace pni{
37 namespace core{
38 
39  //define here a new set of array templates using aliases
57  template<typename T>
59 
60  //-------------------------------------------------------------------------
77  template<
78  typename T,
79  size_t D
80  >
82 
83  //-------------------------------------------------------------------------
105  template<
106  typename T,
107  size_t... NDIMS>
108  using static_array = mdarray<std::array<T,boost::mpl::times<
109  boost::mpl::size_t<1>,
110  boost::mpl::size_t<NDIMS>...
111  >::value
112  >,
113  static_cindex_map<NDIMS...>
114  >;
115 
116 //end of namespace
117 }
118 }
dynamic general index map template
Definition: index_map.hpp:80
Definition: add_op.hpp:29
the static general index map template
Definition: static_index_map.hpp:63
template for a multi-dimensional array class
Definition: mdarray.hpp:66
type erasure for POD data
Definition: value.hpp:46