tc/core/polyhedral/schedule_isl_conversion.cc
// Get the parametric space in which the relation contained by the given tree
// are defined.
Get the parametric space in which the relation contained by the given tree
are defined.
Get the parametric space in which the relation contained by the given tree are defined .
isl::space definitionParamSpace(const ScheduleTree* node) {
  auto space = isl::space(node->ctx_, 0);
  switch (node->type_) {
    case detail::ScheduleTreeType::MappingFilter:
    case detail::ScheduleTreeType::Filter: {
      auto filterNode = node->elemAsBase<ScheduleTreeElemFilter>();
      space = filterNode->filter_.get_space().params();
      break;
    }
    case detail::ScheduleTreeType::Band: {
      auto bandNode = node->elemAs<ScheduleTreeElemBand>();
      space = bandNode->mupa_.get_space().params();
      break;
    }
    case detail::ScheduleTreeType::Extension: {
      auto extensionNode = node->elemAs<ScheduleTreeElemExtension>();
      space = extensionNode->extension_.get_space().params();
      break;
    }
    case detail::ScheduleTreeType::Domain: {
      auto domainElem = node->elemAs<ScheduleTreeElemDomain>();
      space = domainElem->domain_.get_space().params();
      break;
    }
    case detail::ScheduleTreeType::Context: {
      auto contextElem = node->elemAs<ScheduleTreeElemContext>();
      space = contextElem->context_.get_space().params();
      break;
    }
    case detail::ScheduleTreeType::Any:
    case detail::ScheduleTreeType::None:
    case detail::ScheduleTreeType::Set:
    case detail::ScheduleTreeType::Sequence:
      break;
  }
  return space;
}
isl :: space definitionParamSpace ( const ScheduleTree * node ) { auto space = isl :: space ( node -> ctx_ , 0 ) ; switch ( node -> type_ ) { case detail :: ScheduleTreeType :: MappingFilter : case detail :: ScheduleTreeType :: Filter : { auto filterNode = node -> elemAsBase < ScheduleTreeElemFilter > ( ) ; space = filterNode -> filter_ . get_space ( ) . params ( ) ; break ; } case detail :: ScheduleTreeType :: Band : { auto bandNode = node -> elemAs < ScheduleTreeElemBand > ( ) ; space = bandNode -> mupa_ . get_space ( ) . params ( ) ; break ; } case detail :: ScheduleTreeType :: Extension : { auto extensionNode = node -> elemAs < ScheduleTreeElemExtension > ( ) ; space = extensionNode -> extension_ . get_space ( ) . params ( ) ; break ; } case detail :: ScheduleTreeType :: Domain : { auto domainElem = node -> elemAs < ScheduleTreeElemDomain > ( ) ; space = domainElem -> domain_ . get_space ( ) . params ( ) ; break ; } case detail :: ScheduleTreeType :: Context : { auto contextElem = node -> elemAs < ScheduleTreeElemContext > ( ) ; space = contextElem -> context_ . get_space ( ) . params ( ) ; break ; } case detail :: ScheduleTreeType :: Any : case detail :: ScheduleTreeType :: None : case detail :: ScheduleTreeType :: Set : case detail :: ScheduleTreeType :: Sequence : break ; } return space ; }
Get the parametric space in which the relation contained by the given tree
are defined.
Get the parametric space in which the relation contained by the given tree are defined .
// mapping_filter is a filter for ISL // TODO: this switch is too ISL-ish and is not meant for subtyping // extensions. Replace by if (node->elemAsBase<T>(...)) // Other types of nodes do not have any potentially parametric expression.