29      struct StructNumEntities DOXY({});
 
   31      template<
int shape_dim_>
 
   32      struct StructNumEntities<shape_dim_, shape_dim_>
 
   34        static Index compute(
const Index num_slices[])
 
   37          Index count = num_slices[0];
 
   38          for(
int i(1); i < shape_dim_; ++i)
 
   39            count *= (num_slices[i]);
 
   44      template<
int shape_dim_>
 
   45      struct StructNumEntities<shape_dim_, 0>
 
   47        static Index compute(
const Index num_slices[])
 
   50          Index count = num_slices[0] + 1;
 
   51          for(
int i(1); i < shape_dim_; ++i)
 
   52            count *= (num_slices[i] + 1);
 
   58      struct StructNumEntities<2, 1>
 
   60        static Index compute(
const Index num_slices[])
 
   64            num_slices[0] * (num_slices[1] + 1) +
 
   65            num_slices[1] * (num_slices[0] + 1);
 
   70      struct StructNumEntities<3, 1>
 
   72        static Index compute(
const Index num_slices[])
 
   76            num_slices[0] * (num_slices[1] + 1) * (num_slices[2] + 1) +
 
   77            num_slices[1] * (num_slices[0] + 1) * (num_slices[2] + 1) +
 
   78            num_slices[2] * (num_slices[0] + 1) * (num_slices[1] + 1);
 
   83      struct StructNumEntities<3, 2>
 
   85        static Index compute(
const Index num_slices[])
 
   89            (num_slices[0] + 1) * num_slices[1] * num_slices[2] +
 
   90            (num_slices[1] + 1) * num_slices[0] * num_slices[2] +
 
   91            (num_slices[2] + 1) * num_slices[0] * num_slices[1];
 
  105        int cell_dim_ = shape_dim_>
 
  106      struct StructNumEntitiesWrapper
 
  108        static void compute(Index num_entities[], 
const Index num_slices[])
 
  110          StructNumEntitiesWrapper<shape_dim_, cell_dim_ - 1>::compute(num_entities, num_slices);
 
  111          num_entities[cell_dim_] = StructNumEntities<shape_dim_, cell_dim_>::compute(num_slices);
 
  115      template<
int shape_dim_>
 
  116      struct StructNumEntitiesWrapper<shape_dim_, 0>
 
  118        static void compute(Index num_entities[], 
const Index num_slices[])
 
  120          num_entities[0] = StructNumEntities<shape_dim_, 0>::compute(num_slices);
 
std::uint64_t Index
Index data type.