Loading...
Searching...
No Matches
Halide::Internal::ModulusRemainder Struct Reference

The result of modulus_remainder analysis. More...

`#include <ModulusRemainder.h>`

## Public Member Functions

| ModulusRemainder ()=default
| 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 = 1
int64_t | remainder = 0

## 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 33 of file ModulusRemainder.h.

## Constructor & Destructor Documentation

## ModulusRemainder() [1/2]

Halide::Internal::ModulusRemainder::ModulusRemainder | ( |  | ) |

default

Referenced by intersect(), operator==(), and unify().

## ModulusRemainder() [2/2]

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

inline

Definition at line 35 of file ModulusRemainder.h.

References modulus, and remainder.

## Member Function Documentation

## unify()

ModulusRemainder Halide::Internal::ModulusRemainder::unify | ( | const ModulusRemainder & | a,
|  | const ModulusRemainder & | b )

static

References ModulusRemainder().

## intersect()

ModulusRemainder Halide::Internal::ModulusRemainder::intersect | ( | const ModulusRemainder & | a,
|  | const ModulusRemainder & | b )

static

References ModulusRemainder().

Referenced by Halide::Internal::Simplify::ExprInfo::intersect().

## operator==()

bool Halide::Internal::ModulusRemainder::operator== | ( | const ModulusRemainder & | other | ) | const

inline

Definition at line 49 of file ModulusRemainder.h.

References modulus, ModulusRemainder(), and remainder.

## Member Data Documentation

## modulus

int64_t Halide::Internal::ModulusRemainder::modulus = 1

Definition at line 39 of file ModulusRemainder.h.

Referenced by ModulusRemainder(), and operator==().

## remainder

int64_t Halide::Internal::ModulusRemainder::remainder = 0

Definition at line 39 of file ModulusRemainder.h.

Referenced by ModulusRemainder(), and operator==().

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

- src/ModulusRemainder.h