src/core/polyhedral/memory_promotion_heuristic.cc
/*
 * Create a map that increments the "dim"-th dimension and keeps all other
 * dimensions unchanged.
 */
Create a map that increments the "dim"-th dimension and keeps all other
dimensions unchanged.
Create a map that increments the " dim " - th dimension and keeps all other dimensions unchanged .
isl::map makeNextElementMap(isl::space setSpace, int dim) {
  if (dim < 0 || dim >= setSpace.dim(isl::dim_type::set)) {
    std::stringstream ss;
    ss << dim << "  is out of [0, " << setSpace.dim(isl::dim_type::set)
       << ") range";
    throw promotion::OutOfRangeException(ss.str());
  }
  auto mapSpace = setSpace.map_from_set();
  auto identityMA = isl::multi_aff::identity(mapSpace);
  auto aff = identityMA.get_aff(dim);
  identityMA = identityMA.set_aff(dim, aff + 1);
  return isl::map(identityMA);
}
isl :: map makeNextElementMap ( isl :: space setSpace , int dim ) { if ( dim < 0 || dim >= setSpace . dim ( isl :: dim_type :: set ) ) { std :: stringstream ss ; ss << dim << " " << setSpace . dim ( isl :: dim_type :: set ) << " " ; throw promotion :: OutOfRangeException ( ss . str ( ) ) ; } auto mapSpace = setSpace . map_from_set ( ) ; auto identityMA = isl :: multi_aff :: identity ( mapSpace ) ; auto aff = identityMA . get_aff ( dim ) ; identityMA = identityMA . set_aff ( dim , aff + 1 ) ; return isl :: map ( identityMA ) ; }
Create a map that increments the "dim"-th dimension and keeps all other
 dimensions unchanged.
Create a map that increments the " dim " - th dimension and keeps all other dimensions unchanged .