26 #pragma push_macro("None")
192 std::stringstream ss;
201 ss <<
"lifetime_error ";
203 ss <<
"Invalid_Lifetime ";
210 ss <<
"Float[" <<
dim() <<
"]";
216 ss <<
"Invalid_Type";
236 #pragma pop_macro("None")
int _n
Dimension of type _n==1 ignored if _type != FP.
ExprType & Varying()
Mutate this into a varying lifetime.
ExprType()
Default constructor for a type (error and lifetime error)
Varying data (i.e. changes per evaluation point)
bool operator==(const ExprType &other) const
Returns true if this and other match type and dimension.
ExprType & Uniform()
Mutate this into a uniform lifetime.
bool isFP() const
Direct is predicate checks.
Uniform data (i.e. changes only on grids or pixel tiles, depending on how expr used) ...
Constant data (i.e. sub parts of the tree that need only be computed once)
ExprType & String()
Mutate this into a string type.
std::string toString() const
Stringify the type into a printable string.
bool isLifetimeError() const
ExprType & setLifetime(const ExprType &a)
Assign the lifetime from type a to be my type.
Lifetime _lifetime
lifetime of type
Lifetime
Lifetimes that are possible for type, note the order is from highest to lowest priority for promotion...
bool isLifetimeUniform() const
Error in lifetime (uniform data depending on varying etc.)
ExprType TypeVec(int n)
Quick way to get a vector type i.e. 3 vec is TypeVec(3)
ExprType(const ExprType &other)
Copy constructor.
bool isLifetimeConstant() const
validity check: type is not an error
Lifetime lifetime() const
ExprType & Constant()
Mutate this into a constant lifetime.
static bool valuesCompatible(const ExprType &a, const ExprType &b)
Checks if value types are compatible.
ExprType(Type type, int n, Lifetime lifetime)
Fully specified type.
bool operator!=(const ExprType &other) const
Returns true if this and other do not match on type and dimension.
Error type (bad things happened here or upstream in tree)
ExprType & setLifetime(const ExprType &a, const ExprType &b)
Combine the lifetimes (min wins) of a and b and then assign them to this.
ExprType & LifeError()
Mutate this into a lifetime error.
bool isLifetimeVarying() const
ExprType & setLifetime(const ExprType &a, const ExprType &b, const ExprType &c)
Combine the lifetimes (min wins) of a and b and then assign them to this.
bool isLifeCompatible(const ExprType &o) const
Floating point type (this combines with _d member to make vectors)
ExprType & FP(int d)
Mutate this into a floating point type of dimension d.
ExprType & None()
Mutate this into a none type.
Defined as a *alpha b *alpha< br ></div >< br > float< b > float a
ExprType & Error()
Mutate this into an error type.