8 #ifndef STORAGE_ORDER_HPP_ 9 #define STORAGE_ORDER_HPP_ 12 #include "array_openfpm.hpp" 13 #include "boost/multi_array/algorithm.hpp" 23 class c_storage_order;
24 class fortran_storage_order;
25 class ofp_storage_order;
27 template <std::
size_t NumDims>
31 typedef detail::multi_array::size_type size_type;
32 template <
typename OrderingIter,
typename AscendingIter>
34 AscendingIter ascending) {
35 boost::detail::multi_array::copy_n(ordering,NumDims,ordering_.begin());
43 for (size_type i=0; i != NumDims; ++i) {
44 ordering_[i] = NumDims - 1 - i;
49 for (size_type i=0; i != NumDims; ++i) {
57 for (size_type i=1; i != NumDims; ++i)
58 {ordering_[i] = NumDims - i;}
61 size_type ordering(size_type dim)
const {
return ordering_[dim]; }
66 return (ordering_ == rhs.ordering_);
75 typedef detail::multi_array::size_type size_type;
79 #ifndef __MWERKS__ // Metrowerks screams "ambiguity!" 80 template <std::
size_t NumDims>
86 for (size_type i=1; i != NumDims; ++i)
87 {ordering[i] = NumDims - i;}
95 typedef detail::multi_array::size_type size_type;
99 #ifndef __MWERKS__ // Metrowerks screams "ambiguity!" 100 template <std::
size_t NumDims>
105 for (size_type i=0; i != NumDims; ++i) {
106 ordering[i] = NumDims - 1 - i;
115 typedef detail::multi_array::size_type size_type;
119 #ifndef __MWERKS__ // Metrowerks screams "ambiguity!" 120 template <std::
size_t NumDims>
125 for (size_type i=0; i != NumDims; ++i) {
convert a type into constant type