TVM  0.9.4
tvm::Range Class Reference

#include <tvm/Range.h>

Public Member Functions

 Range ()
 
 Range (int s, int d)
 
int end () const
 
bool operator== (const Range &other) const
 
bool operator!= (const Range &other) const
 
bool contains (int i) const
 
bool contains (const Range &other) const
 
bool intersects (const Range &other) const
 
Range operator+ (int i) const
 
Range operator- (int i) const
 
Range relativeRange (const Range &other) const
 

Public Attributes

int start
 
int dim
 

Detailed Description

A pair (start, dim) representing the integer range from start (included) to start+dim (excluded).

Constructor & Destructor Documentation

◆ Range() [1/2]

tvm::Range::Range ( )
inline

◆ Range() [2/2]

tvm::Range::Range ( int  s,
int  d 
)
inline

Member Function Documentation

◆ contains() [1/2]

bool tvm::Range::contains ( const Range other) const
inline

Return true if other is contained in the range.

Empty ranges are considered contained if their start is in the range.

◆ contains() [2/2]

bool tvm::Range::contains ( int  i) const
inline

Return true if i is contained in the range.

◆ end()

int tvm::Range::end ( ) const
inline

First integer not in the range

◆ intersects()

bool tvm::Range::intersects ( const Range other) const
inline

Return true if both range intersects.

◆ operator!=()

bool tvm::Range::operator!= ( const Range other) const
inline

◆ operator+()

Range tvm::Range::operator+ ( int  i) const
inline

Shift start by i.

◆ operator-()

Range tvm::Range::operator- ( int  i) const
inline

Shift start by -i.

◆ operator==()

bool tvm::Range::operator== ( const Range other) const
inline

◆ relativeRange()

Range tvm::Range::relativeRange ( const Range other) const
inline

Return the range of other within this Range.

e.g Range(3,8).relativeRange(5,2) returns Range(2,2)

Member Data Documentation

◆ dim

int tvm::Range::dim

◆ start

int tvm::Range::start

The documentation for this class was generated from the following file: