Halide 21.0.0
Halide compiler and libraries
Loading...
Searching...
No Matches
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.
 Interval (const Expr &min, const Expr &max)
 Construct an interval from a lower and upper bound.
bool is_empty () const
 Is the interval the empty set.
bool is_everything () const
 Is the interval the entire range.
bool is_single_point () const
 Is the interval just a single value (min == max)
bool is_single_point (const Expr &e) const
 Is the interval a particular single value.
bool has_upper_bound () const
 Does the interval have a finite least upper bound.
bool has_lower_bound () const
 Does the interval have a finite greatest lower bound.
bool is_bounded () const
 Does the interval have a finite upper and lower bound.
bool same_as (const Interval &other) const
 Is the interval the same as another interval.
void include (const Interval &i)
 Expand the interval to include another Interval.
void include (const Expr &e)
 Expand the interval to include an Expr.
bool operator== (const Interval &other) const
 Equivalent to same_as.

Static Public Member Functions

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

Public Attributes

Expr min
 The lower and upper bound of the interval.
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.

References max, min, neg_inf(), and pos_inf().

Referenced by everything(), include(), make_intersection(), make_union(), nothing(), operator==(), same_as(), and single_point().

◆ 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 internal_assert, max, and min.

Member Function Documentation

◆ pos_inf()

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

Exprs to represent positive and negative infinity.

Definition at line 25 of file Interval.h.

Referenced by Interval().

◆ neg_inf()

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

Definition at line 28 of file Interval.h.

Referenced by Interval().

◆ everything()

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

The interval representing everything.

References Interval().

◆ nothing()

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

The interval representing nothing.

References Interval().

◆ single_point()

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

Construct an interval representing a single point.

References Interval().

◆ 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.

References Interval().

◆ include() [1/2]

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

Expand the interval to include another Interval.

References Interval().

◆ include() [2/2]

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

Expand the interval to include an Expr.

◆ make_union()

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

Construct the smallest interval containing two intervals.

References Interval().

◆ make_intersection()

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

Construct the largest interval contained within two other intervals.

References Interval().

◆ make_max()

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()

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.

References Interval().

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(), and Interval().

◆ max

Expr Halide::Internal::Interval::max

Definition at line 35 of file Interval.h.

Referenced by Interval(), and Interval().


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