@@ -533,8 +533,8 @@ struct grid_helper {
533533 const std::array<std::size_t , sizeof ...(Axes)>& localIndices,
534534 const std::tuple<Axes...>& axes) {
535535 std::array<double , sizeof ...(Axes)> center{};
536- constexpr std:: size_t MAX = sizeof ...(Axes) - 1 ;
537- grid_helper_impl< MAX >:: getBinCenter (center, localIndices, axes);
536+ grid_helper_impl< sizeof ...(Axes) - 1 >:: getBinCenter (center, localIndices,
537+ axes);
538538
539539 return center;
540540 }
@@ -553,11 +553,11 @@ struct grid_helper {
553553 static std::size_t getGlobalBin (
554554 const std::array<std::size_t , sizeof ...(Axes)>& localBins,
555555 const std::tuple<Axes...>& axes) {
556- constexpr std::size_t MAX = sizeof ...(Axes) - 1 ;
557556 std::size_t area = 1 ;
558557 std::size_t bin = 0 ;
559558
560- grid_helper_impl<MAX >::getGlobalBin (localBins, axes, bin, area);
559+ grid_helper_impl<sizeof ...(Axes) - 1 >::getGlobalBin (localBins, axes, bin,
560+ area);
561561
562562 return bin;
563563 }
@@ -579,10 +579,10 @@ struct grid_helper {
579579 template <class Point , class ... Axes>
580580 static std::array<std::size_t , sizeof ...(Axes)> getLocalBinIndices (
581581 const Point& point, const std::tuple<Axes...>& axes) {
582- constexpr std::size_t MAX = sizeof ...(Axes) - 1 ;
583582 std::array<std::size_t , sizeof ...(Axes)> indices{};
584583
585- grid_helper_impl<MAX >::getLocalBinIndices (point, axes, indices);
584+ grid_helper_impl<sizeof ...(Axes) - 1 >::getLocalBinIndices (point, axes,
585+ indices);
586586
587587 return indices;
588588 }
@@ -600,11 +600,11 @@ struct grid_helper {
600600 template <class ... Axes>
601601 static std::array<std::size_t , sizeof ...(Axes)> getLocalBinIndices (
602602 std::size_t bin, const std::tuple<Axes...>& axes) {
603- constexpr std::size_t MAX = sizeof ...(Axes) - 1 ;
604603 std::size_t area = 1 ;
605604 std::array<std::size_t , sizeof ...(Axes)> indices{};
606605
607- grid_helper_impl<MAX >::getLocalBinIndices (bin, axes, area, indices);
606+ grid_helper_impl<sizeof ...(Axes) - 1 >::getLocalBinIndices (bin, axes, area,
607+ indices);
608608
609609 return indices;
610610 }
@@ -623,8 +623,8 @@ struct grid_helper {
623623 const std::array<std::size_t , sizeof ...(Axes)>& localIndices,
624624 const std::tuple<Axes...>& axes) {
625625 std::array<double , sizeof ...(Axes)> llEdge{};
626- constexpr std:: size_t MAX = sizeof ...(Axes) - 1 ;
627- grid_helper_impl< MAX >:: getLowerLeftBinEdge ( llEdge, localIndices, axes);
626+ grid_helper_impl< sizeof ...(Axes) - 1 >:: getLowerLeftBinEdge (
627+ llEdge, localIndices, axes);
628628
629629 return llEdge;
630630 }
@@ -646,9 +646,9 @@ struct grid_helper {
646646 static std::array<std::size_t , sizeof ...(Axes)> getLowerLeftBinIndices (
647647 const std::array<std::size_t , sizeof ...(Axes)>& localIndices,
648648 const std::tuple<Axes...>& axes) {
649- constexpr std::size_t MAX = sizeof ...(Axes) - 1 ;
650649 auto llIndices = localIndices;
651- grid_helper_impl<MAX >::getLowerLeftBinIndices (llIndices, axes);
650+ grid_helper_impl<sizeof ...(Axes) - 1 >::getLowerLeftBinIndices (llIndices,
651+ axes);
652652
653653 return llIndices;
654654 }
@@ -697,8 +697,8 @@ struct grid_helper {
697697 const std::array<std::size_t , sizeof ...(Axes)>& localIndices,
698698 const std::tuple<Axes...>& axes) {
699699 std::array<double , sizeof ...(Axes)> urEdge{};
700- constexpr std:: size_t MAX = sizeof ...(Axes) - 1 ;
701- grid_helper_impl< MAX >:: getUpperRightBinEdge ( urEdge, localIndices, axes);
700+ grid_helper_impl< sizeof ...(Axes) - 1 >:: getUpperRightBinEdge (
701+ urEdge, localIndices, axes);
702702
703703 return urEdge;
704704 }
@@ -720,9 +720,9 @@ struct grid_helper {
720720 static std::array<std::size_t , sizeof ...(Axes)> getUpperRightBinIndices (
721721 const std::array<std::size_t , sizeof ...(Axes)>& localIndices,
722722 const std::tuple<Axes...>& axes) {
723- constexpr std::size_t MAX = sizeof ...(Axes) - 1 ;
724723 auto urIndices = localIndices;
725- grid_helper_impl<MAX >::getUpperRightBinIndices (urIndices, axes);
724+ grid_helper_impl<sizeof ...(Axes) - 1 >::getUpperRightBinIndices (urIndices,
725+ axes);
726726
727727 return urIndices;
728728 }
@@ -791,13 +791,11 @@ struct grid_helper {
791791 const std::array<std::size_t , sizeof ...(Axes)>& localIndices,
792792 std::pair<std::size_t, std::size_t> sizes,
793793 const std::tuple<Axes...>& axes) {
794- constexpr std::size_t MAX = sizeof ...(Axes) - 1 ;
795-
796794 // length N array which contains local neighbors based on size par
797795 std::array<NeighborHoodIndices, sizeof ...(Axes)> neighborIndices{};
798796 // get local bin indices for neighboring bins
799- grid_helper_impl<MAX >::neighborHoodIndices (localIndices, sizes, axes,
800- neighborIndices);
797+ grid_helper_impl<sizeof ...(Axes) - 1 >::neighborHoodIndices (
798+ localIndices, sizes, axes, neighborIndices);
801799
802800 // Query the number of bins
803801 std::array<std::size_t , sizeof ...(Axes)> nBinsArray = getNBins (axes);
@@ -840,13 +838,11 @@ struct grid_helper {
840838 const std::array<std::size_t , sizeof ...(Axes)>& localIndices,
841839 std::array<std::pair<int, int>, sizeof...(Axes)>& sizes,
842840 const std::tuple<Axes...>& axes) {
843- constexpr std::size_t MAX = sizeof ...(Axes) - 1 ;
844-
845841 // length N array which contains local neighbors based on size par
846842 std::array<NeighborHoodIndices, sizeof ...(Axes)> neighborIndices{};
847843 // get local bin indices for neighboring bins
848- grid_helper_impl<MAX >::neighborHoodIndices (localIndices, sizes, axes,
849- neighborIndices);
844+ grid_helper_impl<sizeof ...(Axes) - 1 >::neighborHoodIndices (
845+ localIndices, sizes, axes, neighborIndices);
850846
851847 // Query the number of bins
852848 std::array<std::size_t , sizeof ...(Axes)> nBinsArray = getNBins (axes);
@@ -863,13 +859,11 @@ struct grid_helper {
863859 template <class ... Axes>
864860 static std::set<std::size_t > exteriorBinIndices (
865861 const std::tuple<Axes...>& axes) {
866- constexpr std::size_t MAX = sizeof ...(Axes) - 1 ;
867-
868862 std::array<std::size_t , sizeof ...(Axes)> idx{};
869863 std::array<bool , sizeof ...(Axes)> isExterior{};
870864 std::set<std::size_t > combinations;
871- grid_helper_impl<MAX >::exteriorBinIndices (idx, isExterior, combinations,
872- axes);
865+ grid_helper_impl<sizeof ...(Axes) - 1 >::exteriorBinIndices (
866+ idx, isExterior, combinations, axes);
873867
874868 return combinations;
875869 }
0 commit comments