Halide
Halide::Internal::Interval Struct Reference

A class to represent ranges of Exprs. More...

#include <Interval.h>

Public Member Functions

 Interval ()
 A default-constructed Interval is everything. More...
 
 Interval (const Expr &min, const Expr &max)
 Construct an interval from a lower and upper bound. More...
 
bool is_empty () const
 Is the interval the empty set. More...
 
bool is_everything () const
 Is the interval the entire range. More...
 
bool is_single_point () const
 Is the interval just a single value (min == max) More...
 
bool is_single_point (const Expr &e) const
 Is the interval a particular single value. More...
 
bool has_upper_bound () const
 Does the interval have a finite least upper bound. More...
 
bool has_lower_bound () const
 Does the interval have a finite greatest lower bound. More...
 
bool is_bounded () const
 Does the interval have a finite upper and lower bound. More...
 
bool same_as (const Interval &other) const
 Is the interval the same as another interval. More...
 
void include (const Interval &i)
 Expand the interval to include another Interval. More...
 
void include (const Expr &e)
 Expand the interval to include an Expr. More...
 
bool operator== (const Interval &other) const
 Equivalent to same_as. More...
 

Static Public Member Functions

static Expr pos_inf ()
 Exprs to represent positive and negative infinity. More...
 
static Expr neg_inf ()
 
static Interval everything ()
 The interval representing everything. More...
 
static Interval nothing ()
 The interval representing nothing. More...
 
static Interval single_point (const Expr &e)
 Construct an interval representing a single point. More...
 
static Interval make_union (const Interval &a, const Interval &b)
 Construct the smallest interval containing two intervals. More...
 
static Interval make_intersection (const Interval &a, const Interval &b)
 Construct the largest interval contained within two intervals. More...
 
static Expr make_max (const Expr &a, const Expr &b)
 An eagerly-simplifying max of two Exprs that respects infinities. More...
 
static Expr make_min (const Expr &a, const Expr &b)
 An eagerly-simplifying min of two Exprs that respects infinities. More...
 

Public Attributes

Expr min
 The lower and upper bound of the interval. More...
 
Expr max
 

Detailed Description

A class to represent ranges of Exprs.

Can be unbounded above or below.

Definition at line 14 of file Interval.h.

Constructor & Destructor Documentation

◆ Interval() [1/2]

Halide::Internal::Interval::Interval ( )
inline

A default-constructed Interval is everything.

Definition at line 38 of file Interval.h.

◆ Interval() [2/2]

Halide::Internal::Interval::Interval ( const Expr min,
const Expr max 
)
inline

Construct an interval from a lower and upper bound.

Definition at line 43 of file Interval.h.

References Halide::Internal::IntrusivePtr< T >::defined(), internal_assert, max, and min.

Member Function Documentation

◆ pos_inf()

static Expr Halide::Internal::Interval::pos_inf ( )
inlinestatic

Exprs to represent positive and negative infinity.

Definition at line 25 of file Interval.h.

◆ neg_inf()

static Expr Halide::Internal::Interval::neg_inf ( )
inlinestatic

Definition at line 28 of file Interval.h.

◆ everything()

static Interval Halide::Internal::Interval::everything ( )
static

The interval representing everything.

◆ nothing()

static Interval Halide::Internal::Interval::nothing ( )
static

The interval representing nothing.

◆ single_point()

static Interval Halide::Internal::Interval::single_point ( const Expr e)
static

Construct an interval representing a single point.

◆ is_empty()

bool Halide::Internal::Interval::is_empty ( ) const

Is the interval the empty set.

◆ is_everything()

bool Halide::Internal::Interval::is_everything ( ) const

Is the interval the entire range.

◆ is_single_point() [1/2]

bool Halide::Internal::Interval::is_single_point ( ) const

Is the interval just a single value (min == max)

◆ is_single_point() [2/2]

bool Halide::Internal::Interval::is_single_point ( const Expr e) const

Is the interval a particular single value.

◆ has_upper_bound()

bool Halide::Internal::Interval::has_upper_bound ( ) const

Does the interval have a finite least upper bound.

◆ has_lower_bound()

bool Halide::Internal::Interval::has_lower_bound ( ) const

Does the interval have a finite greatest lower bound.

◆ is_bounded()

bool Halide::Internal::Interval::is_bounded ( ) const

Does the interval have a finite upper and lower bound.

◆ same_as()

bool Halide::Internal::Interval::same_as ( const Interval other) const

Is the interval the same as another interval.

◆ include() [1/2]

void Halide::Internal::Interval::include ( const Interval i)

Expand the interval to include another Interval.

◆ include() [2/2]

void Halide::Internal::Interval::include ( const Expr e)

Expand the interval to include an Expr.

◆ make_union()

static Interval Halide::Internal::Interval::make_union ( const Interval a,
const Interval b 
)
static

Construct the smallest interval containing two intervals.

◆ make_intersection()

static Interval Halide::Internal::Interval::make_intersection ( const Interval a,
const Interval b 
)
static

Construct the largest interval contained within two intervals.

◆ make_max()

static Expr Halide::Internal::Interval::make_max ( const Expr a,
const Expr b 
)
static

An eagerly-simplifying max of two Exprs that respects infinities.

◆ make_min()

static Expr Halide::Internal::Interval::make_min ( const Expr a,
const Expr b 
)
static

An eagerly-simplifying min of two Exprs that respects infinities.

◆ operator==()

bool Halide::Internal::Interval::operator== ( const Interval other) const

Equivalent to same_as.

Exists so that the autoscheduler can compare two map<string, Interval> for equality in order to cache computations.

Member Data Documentation

◆ min

Expr Halide::Internal::Interval::min

The lower and upper bound of the interval.

They are included in the interval.

Definition at line 35 of file Interval.h.

Referenced by Interval().

◆ max

Expr Halide::Internal::Interval::max

Definition at line 35 of file Interval.h.

Referenced by Interval().


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