1#ifndef HALIDE_CONSTANT_INTERVAL_H
2#define HALIDE_CONSTANT_INTERVAL_H
ConstantInterval operator*(const ConstantInterval &a, const ConstantInterval &b)
bool operator>=(const ConstantInterval &a, const ConstantInterval &b)
ConstantInterval operator>>(const ConstantInterval &a, const ConstantInterval &b)
ConstantInterval operator%(const ConstantInterval &a, const ConstantInterval &b)
ConstantInterval min(const ConstantInterval &a, const ConstantInterval &b)
ConstantInterval max(const ConstantInterval &a, const ConstantInterval &b)
ConstantInterval operator/(const ConstantInterval &a, const ConstantInterval &b)
ConstantInterval operator-(const ConstantInterval &a, const ConstantInterval &b)
bool operator<(const ConstantInterval &a, const ConstantInterval &b)
ConstantInterval operator+(const ConstantInterval &a, const ConstantInterval &b)
Arithmetic operators on ConstantIntervals.
ConstantInterval operator<<(const ConstantInterval &a, const ConstantInterval &b)
bool operator<=(const ConstantInterval &a, const ConstantInterval &b)
Comparison operators on ConstantIntervals.
bool operator>(const ConstantInterval &a, const ConstantInterval &b)
ConstantInterval abs(const ConstantInterval &a)
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
@ Internal
Not visible externally, similar to 'static' linkage in C.
Internal::ConstantInterval cast(Type t, const Internal::ConstantInterval &a)
Cast operators for ConstantIntervals.
Internal::ConstantInterval saturating_cast(Type t, const Internal::ConstantInterval &a)
unsigned __INT64_TYPE__ uint64_t
signed __INT64_TYPE__ int64_t
signed __INT32_TYPE__ int32_t
A class to represent ranges of integers.
void operator-=(const ConstantInterval &other)
void operator/=(const ConstantInterval &other)
static ConstantInterval bounded_above(int64_t max)
void operator+=(const ConstantInterval &other)
In-place versions of the arithmetic operators below.
static ConstantInterval bounds_of_type(Type)
Get constant integer bounds on a type.
bool contains(uint64_t x) const
Test if the interval contains a particular unsigned value.
bool is_bounded() const
Does the interval have a finite upper and lower bound.
ConstantInterval(int64_t min, int64_t max)
Construct an interval from a lower and upper bound.
static ConstantInterval make_intersection(const ConstantInterval &a, const ConstantInterval &b)
Construct the largest interval contained within two intervals.
bool operator==(const ConstantInterval &other) const
Equivalent to same_as.
static ConstantInterval make_union(const ConstantInterval &a, const ConstantInterval &b)
Construct the smallest interval containing two intervals.
static ConstantInterval bounded_below(int64_t min)
Construct intervals bounded above or below.
void operator%=(const ConstantInterval &other)
ConstantInterval()=default
bool is_single_point() const
Is the interval just a single value (min == max)
bool is_everything() const
Is the interval the entire range.
void include(const ConstantInterval &i)
Expand the interval to include another Interval.
void operator*=(const ConstantInterval &other)
void include(int64_t x)
Expand the interval to include a point.
void cast_to(const Type &t)
Track what happens if a constant integer interval is forced to fit into a concrete integer type.
bool contains(int64_t x) const
Test if the interval contains a particular value.
static ConstantInterval everything()
The interval representing everything.
ConstantInterval operator-() const
Negate an interval.
bool is_single_point(int64_t x) const
Is the interval a particular single value.
static ConstantInterval single_point(int64_t x)
Construct an interval representing a single point.
bool contains(int32_t x) const
Test if the interval contains a particular value.
Types in the halide type system.