Class IntSet#
Defined in File int_set.h
Inheritance Relationships#
Base Type#
public ffi::ObjectRef
Class Documentation#
-
class IntSet : public ffi::ObjectRef#
Managed reference to IntSetObj.
See also
Public Functions
-
ffi::Optional<Range> CoverRange(ffi::Optional<Range> max_range) const#
Find a range that covers the region.
- Parameters:
max_range – The range to be covered.
- Returns:
The covering range.
-
bool IsNothing() const#
- Returns:
Whether the set represent nothing
-
bool IsEverything() const#
- Returns:
Whether the set represent everything
-
bool IsSinglePoint() const#
- Returns:
Whether the set is a single point
-
bool CanProveSinglePoint(const Analyzer &ana) const#
Check if we can prove it is a single point.
Unlike IsSinglePoint, which only checks ptr equality this function will invoke analyzer to do stonger proofs but also takes longer time.
Use this function in some of the primitives but do not use it in the inner loop of simplification.
- Parameters:
ana – Analyzer used in the proof.
- Returns:
Whether we can prove it is a single point
-
bool CanProvePositive() const#
- Returns:
Whether the set is proved to be bigger than 0
-
bool CanProveNegative() const#
- Returns:
Whether the set is proved to be smaller than 0
-
bool CanProveNonPositive() const#
- Returns:
Whether the set is proved to be smaller than or equal to 0
-
bool CanProveNonNegative() const#
- Returns:
Whether the set is proved to be larger than or equal to 0
-
bool HasUpperBound() const#
- Returns:
Whether the set has upper bound.
-
bool HasLowerBound() const#
- Returns:
Whether the set has lower bound.
-
PrimExpr PointValue() const#
The single point value, call only if IsSinglePoint is true.
- Returns:
The point value.
-
bool MatchRange(const tvm::Range &r) const#
Try to match IntSet with range r.
Note
It is guanrateed that IntSet::FromRange(r).MatchRange(r) == true
- Returns:
true if we can prove they are the same.
-
inline explicit IntSet(::tvm::ffi::UnsafeInit tag)#
-
inline __PtrType operator->() const#
-
inline __PtrType get() const#
Public Static Functions
-
static IntSet SinglePoint(PrimExpr point)#
construct a point set.
- Parameters:
point – The point in the set.
- Returns:
construct a single point set
-
static IntSet Vector(PrimExpr vec)#
construct a integer set from vector expression.
- Parameters:
vec – The vector expression, can also be single point.
- Returns:
The result set containing the indices in the vector.
-
static IntSet FromMinExtent(PrimExpr min, PrimExpr extent)#
Construct a set representing a range [min, min + extent).
- Parameters:
min – The minimum of the range range
extent – The extent of the range.
- Returns:
The constructed set.
-
ffi::Optional<Range> CoverRange(ffi::Optional<Range> max_range) const#