|
MLIR
22.0.0git
|
A class to represent fractions. More...
#include "mlir/Analysis/Presburger/Fraction.h"
Public Member Functions | |
| Fraction ()=default | |
| Default constructor initializes the represented rational number to zero. More... | |
| Fraction (const DynamicAPInt &oNum, const DynamicAPInt &oDen=DynamicAPInt(1)) | |
| Construct a Fraction from a numerator and denominator. More... | |
| Fraction (const DynamicAPInt &num, int64_t den) | |
| Overloads for passing literals. More... | |
| Fraction (int64_t num, const DynamicAPInt &den=DynamicAPInt(1)) | |
| Fraction (int64_t num, int64_t den) | |
| DynamicAPInt | getAsInteger () const |
| llvm::raw_ostream & | print (llvm::raw_ostream &os) const |
Public Attributes | |
| DynamicAPInt | num {0} |
| The numerator and denominator, respectively. More... | |
| DynamicAPInt | den {1} |
A class to represent fractions.
The sign of the fraction is represented in the sign of the numerator; the denominator is always positive.
Note that overflows may occur if the numerator or denominator are not representable by 64-bit integers.
Definition at line 29 of file Fraction.h.
|
default |
Default constructor initializes the represented rational number to zero.
|
inline |
Construct a Fraction from a numerator and denominator.
Definition at line 34 of file Fraction.h.
|
inline |
Overloads for passing literals.
Definition at line 42 of file Fraction.h.
|
inline |
Definition at line 44 of file Fraction.h.
|
inline |
Definition at line 46 of file Fraction.h.
|
inline |
Definition at line 51 of file Fraction.h.
Referenced by mlir::presburger::IntMatrix::determinant(), and mlir::presburger::LexSimplex::findIntegerLexMin().
|
inline |
Definition at line 56 of file Fraction.h.
Referenced by mlir::presburger::operator<<().
| DynamicAPInt mlir::presburger::Fraction::den {1} |
Definition at line 62 of file Fraction.h.
Referenced by mlir::presburger::abs(), mlir::presburger::ceil(), mlir::presburger::compare(), mlir::presburger::floor(), Fraction(), getAsInteger(), mlir::presburger::operator*(), mlir::presburger::operator+(), mlir::presburger::operator-(), mlir::presburger::operator/(), print(), mlir::presburger::reduce(), and mlir::presburger::round().
| DynamicAPInt mlir::presburger::Fraction::num {0} |
The numerator and denominator, respectively.
The denominator is always positive.
Definition at line 62 of file Fraction.h.
Referenced by mlir::presburger::abs(), mlir::presburger::ceil(), mlir::presburger::compare(), mlir::presburger::floor(), Fraction(), getAsInteger(), mlir::presburger::operator*(), mlir::presburger::operator+(), mlir::presburger::operator-(), mlir::presburger::operator/(), print(), mlir::presburger::reduce(), and mlir::presburger::round().