8 #ifndef STORAGE_ORDER_HPP_
9 #define STORAGE_ORDER_HPP_
12 #include "array_openfpm.hpp"
13 #include "boost/multi_array/algorithm.hpp"
14 #include <boost/mpl/push_back.hpp>
15 #include <boost/mpl/vector.hpp>
16 #include <boost/mpl/at.hpp>
26 template<
unsigned int NumDims,
unsigned int n,
typename T>
struct c_storage_order;
27 template<
unsigned int NumDims,
unsigned int n,
typename T>
struct ofp_storage_order;
28 template<
unsigned int NumDims,
unsigned int n,
typename T>
struct fortran_storage_order;
30 template<
unsigned int NumDims,
unsigned int n=NumDims-1,
typename T=boost::mpl::vector<>>
33 typedef typename boost::mpl::push_back<
typename c_storage_order<NumDims,n-1,T>::value, boost::mpl::int_<NumDims-1-n>>::type value;
36 template <
unsigned int NumDims,
typename T>
39 typedef typename boost::mpl::push_back<T,boost::mpl::int_<NumDims-1>>::type value;
42 template<
unsigned int NumDims,
unsigned int n=NumDims-1,
typename T=boost::mpl::vector<>>
45 typedef typename boost::mpl::push_back<
typename fortran_storage_order<NumDims,n-1,T>::value, boost::mpl::int_<n>>::type value;
48 template <
unsigned int NumDims,
typename T>
51 typedef typename boost::mpl::push_back<T,boost::mpl::int_<0>>::type value;
54 template<
unsigned int NumDims,
unsigned int n=NumDims-1,
typename T=boost::mpl::vector<>>
57 typedef typename boost::mpl::push_back<
typename ofp_storage_order<NumDims,n-1,T>::value, boost::mpl::int_<NumDims-n>>::type value;
60 template <
unsigned int NumDims,
typename T>
63 typedef typename boost::mpl::push_back<T,boost::mpl::int_<0>>::type value;
convert a type into constant type