Halide
Halide::Internal::ModulusRemainder Struct Reference

The result of modulus_remainder analysis. More...

#include <ModulusRemainder.h>

Public Member Functions

 ModulusRemainder ()
 
 ModulusRemainder (int64_t m, int64_t r)
 
bool operator== (const ModulusRemainder &other) const
 

Static Public Member Functions

static ModulusRemainder unify (const ModulusRemainder &a, const ModulusRemainder &b)
 
static ModulusRemainder intersect (const ModulusRemainder &a, const ModulusRemainder &b)
 

Public Attributes

int64_t modulus
 
int64_t remainder
 

Detailed Description

The result of modulus_remainder analysis.

These represent strided subsets of the integers. A ModulusRemainder object m represents all integers x such that there exists y such that x == m.modulus * y + m.remainder. Note that under this definition a set containing a single integer (a constant) is represented using a modulus of zero. These sets can be combined with several mathematical operators in the obvious way. E.g. m1 + m2 contains (at least) all integers x1 + x2 such that x1 belongs to m1 and x2 belongs to m2. These combinations are conservative. If some internal math would overflow, it defaults to all of the integers (modulus == 1, remainder == 0).

Definition at line 31 of file ModulusRemainder.h.

Constructor & Destructor Documentation

◆ ModulusRemainder() [1/2]

Halide::Internal::ModulusRemainder::ModulusRemainder ( )
inline

Definition at line 32 of file ModulusRemainder.h.

◆ ModulusRemainder() [2/2]

Halide::Internal::ModulusRemainder::ModulusRemainder ( int64_t  m,
int64_t  r 
)
inline

Definition at line 35 of file ModulusRemainder.h.

Member Function Documentation

◆ unify()

static ModulusRemainder Halide::Internal::ModulusRemainder::unify ( const ModulusRemainder a,
const ModulusRemainder b 
)
static

◆ intersect()

static ModulusRemainder Halide::Internal::ModulusRemainder::intersect ( const ModulusRemainder a,
const ModulusRemainder b 
)
static

◆ operator==()

bool Halide::Internal::ModulusRemainder::operator== ( const ModulusRemainder other) const
inline

Definition at line 49 of file ModulusRemainder.h.

References modulus, and remainder.

Member Data Documentation

◆ modulus

int64_t Halide::Internal::ModulusRemainder::modulus

◆ remainder

int64_t Halide::Internal::ModulusRemainder::remainder

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