#include <index_map.h>
|
| IndexMap (Array< Var > initial_indices, Array< PrimExpr > final_indices, Optional< IndexMap > inverse_index_map=NullOpt) |
| The constructor. More...
|
|
IndexMap | Inverse (Array< Range > initial_ranges, arith::Analyzer *analyzer) const |
| Generate the inverse mapping. More...
|
|
IndexMap | RenameVariables (const std::function< Optional< String >(const Var &var)> &f_name_map=nullptr) const |
| Rename the variables in the index map and ensure the names are unique. More...
|
|
std::pair< IndexMap, PrimExpr > | NonSurjectiveInverse (Array< Range > initial_ranges, arith::Analyzer *analyzer) const |
| Generate the inverse mapping. More...
|
|
| TVM_DEFINE_OBJECT_REF_METHODS (IndexMap, ObjectRef, IndexMapNode) |
|
| ObjectRef ()=default |
| default constructor More...
|
|
| ObjectRef (ObjectPtr< Object > data) |
| Constructor from existing object ptr. More...
|
|
bool | same_as (const ObjectRef &other) const |
| Comparator. More...
|
|
bool | operator== (const ObjectRef &other) const |
| Comparator. More...
|
|
bool | operator!= (const ObjectRef &other) const |
| Comparator. More...
|
|
bool | operator< (const ObjectRef &other) const |
| Comparator. More...
|
|
bool | defined () const |
|
const Object * | get () const |
|
const Object * | operator-> () const |
|
bool | unique () const |
|
int | use_count () const |
|
template<typename ObjectType , typename = std::enable_if_t<std::is_base_of_v<Object, ObjectType>>> |
const ObjectType * | as () const |
| Try to downcast the internal Object to a raw pointer of a corresponding type. More...
|
|
template<typename ObjectRefType , typename = std::enable_if_t<std::is_base_of_v<ObjectRef, ObjectRefType>>> |
Optional< ObjectRefType > | as () const |
| Try to downcast the ObjectRef to a Optional<T> of the requested type. More...
|
|
◆ IndexMap()
The constructor.
- Parameters
-
initial_indices | Variables representing the indices prior to remapping |
final_indices | Expressions defining the indices after remapping. |
inverse_index_map | The optional pre-defined inverse index map |
◆ FromFunc()
Create an index map from a packed function.
- Parameters
-
ndim | The number of dimensions |
func | The function to be applied |
inverse_index_map | The optional pre-defined inverse index map |
- Returns
- The created index map
◆ Inverse()
Generate the inverse mapping.
The range of the input indices is required in order to ensure that the transformation is bijective over the input domain.
If the user has supplied an inverse_index_map
, that map is assumed to be correct and bijective, and is returned.
◆ NonSurjectiveInverse()
Generate the inverse mapping.
Determine the inverse, where the output range may contain addresses that do not correspond to an address in the input range.
- Returns
- The inverted index map, along with the predicate for which the inverse maps to a valid range.
◆ RenameVariables()
IndexMap tvm::tir::IndexMap::RenameVariables |
( |
const std::function< Optional< String >(const Var &var)> & |
f_name_map = nullptr | ) |
const |
Rename the variables in the index map and ensure the names are unique.
Construct a new index map with the same transformation, but with name_hint of variables to be guaranteed unique. The optional f_name_map can be provided to rename the variables.
- Parameters
-
f_name_map | The optional name map to rename the variables. |
- Returns
- The renamed index map.
◆ TVM_DEFINE_OBJECT_REF_METHODS()
The documentation for this class was generated from the following file: