#include <index_map.h>
|
| static IndexMap | FromFunc (int ndim, ffi::TypedFunction< ffi::Array< PrimExpr >(ffi::Array< Var >)> func, ffi::Optional< IndexMap > inverse_index_map=std::nullopt) |
| | Create an index map from a packed function. More...
|
| |
◆ IndexMap()
| tvm::tirx::IndexMap::IndexMap |
( |
ffi::Array< PrimVar > |
initial_indices, |
|
|
ffi::Array< PrimExpr > |
final_indices, |
|
|
ffi::Optional< IndexMap > |
inverse_index_map = std::nullopt |
|
) |
| |
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()
| static IndexMap tvm::tirx::IndexMap::FromFunc |
( |
int |
ndim, |
|
|
ffi::TypedFunction< ffi::Array< PrimExpr >(ffi::Array< Var >)> |
func, |
|
|
ffi::Optional< IndexMap > |
inverse_index_map = std::nullopt |
|
) |
| |
|
static |
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() [1/2]
| IndexMap tvm::tirx::IndexMap::Inverse |
( |
ffi::Array< Range > |
initial_ranges | ) |
const |
Generate the inverse mapping using a fresh analyzer.
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.
- Parameters
-
| initial_ranges | The ranges of the input indices. |
◆ Inverse() [2/2]
Generate the inverse mapping using an existing analyzer.
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.
- Parameters
-
| initial_ranges | The ranges of the input indices. |
| analyzer | An analyzer to be used while deriving and validating the inverse. |
◆ NonSurjectiveInverse() [1/2]
| std::pair<IndexMap, PrimExpr> tvm::tirx::IndexMap::NonSurjectiveInverse |
( |
ffi::Array< Range > |
initial_ranges | ) |
const |
Generate the inverse mapping using a fresh analyzer.
Determine the inverse, where the output range may contain addresses that do not correspond to an address in the input range.
- Parameters
-
| initial_ranges | The ranges of the input indices. |
- Returns
- The inverted index map, along with the predicate for which the inverse maps to a valid range.
◆ NonSurjectiveInverse() [2/2]
Generate the inverse mapping using an existing analyzer.
Determine the inverse, where the output range may contain addresses that do not correspond to an address in the input range.
- Parameters
-
| initial_ranges | The ranges of the input indices. |
| analyzer | An analyzer to be used while deriving the inverse and padding predicate. |
- Returns
- The inverted index map, along with the predicate for which the inverse maps to a valid range.
◆ RenameVariables()
| IndexMap tvm::tirx::IndexMap::RenameVariables |
( |
const std::function< ffi::Optional< ffi::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_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE()
| tvm::tirx::IndexMap::TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE |
( |
IndexMap |
, |
|
|
ffi::ObjectRef |
, |
|
|
IndexMapNode |
|
|
) |
| |
The documentation for this class was generated from the following file: