Class Range#

Inheritance Relationships#

Base Type#

  • public ffi::ObjectRef

Class Documentation#

class Range : public ffi::ObjectRef#

Range container.

Public Types

using ContainerType = RangeObj#

Public Functions

Range(PrimExpr begin, PrimExpr end, Location loc = UnknownLoc())#

constructor by begin and end

Parameters:
  • begin – The begin of the range.

  • end – The end of the range.

  • loc – The location of the Range in the source.

inline explicit Range(ffi::UnsafeInit tag, ffi::ObjectPtr<RangeObj> n)#
inline explicit Range(::tvm::ffi::UnsafeInit tag)#
inline __PtrType operator->() const#
inline __PtrType get() const#

Public Static Functions

static Range FromMinExtent(PrimExpr min, PrimExpr extent, Location loc = UnknownLoc())#

construct a new range with min and extent The corresponding constructor is removed, because that is counter convention of tradition meaning of range(begin, end)

Parameters:
  • min – The minimum range.

  • extent – The extent of the range.

  • loc – The location of the Range in the source.

static PrimExpr GetExtentFromBeginEnd(const PrimExpr &begin, const PrimExpr &end)#

Extract the interval width from its endpoints without an analyzer.

For begin + extent or extent + begin, return the original extent operand. Otherwise form end - begin using primitive arithmetic.