MLIR  20.0.0git
Public Member Functions | List of all members
mlir::presburger::IntegerRelation::CountsSnapshot Struct Reference

The struct CountsSnapshot stores the count of each VarKind, and also of each constraint type. More...

#include "mlir/Analysis/Presburger/IntegerRelation.h"

Public Member Functions

 CountsSnapshot (const PresburgerSpace &space, unsigned numIneqs, unsigned numEqs)
 
const PresburgerSpacegetSpace () const
 
unsigned getNumIneqs () const
 
unsigned getNumEqs () const
 

Detailed Description

The struct CountsSnapshot stores the count of each VarKind, and also of each constraint type.

getCounts() returns a CountsSnapshot object describing the current state of the IntegerRelation. truncate() truncates all vars of each VarKind and all constraints of both kinds beyond the counts in the specified CountsSnapshot object. This can be used to achieve rudimentary rollback support. As long as none of the existing constraints or vars are disturbed, and only additional vars or constraints are added, this addition can be rolled back using truncate.

Definition at line 282 of file IntegerRelation.h.

Constructor & Destructor Documentation

◆ CountsSnapshot()

mlir::presburger::IntegerRelation::CountsSnapshot::CountsSnapshot ( const PresburgerSpace space,
unsigned  numIneqs,
unsigned  numEqs 
)
inline

Definition at line 284 of file IntegerRelation.h.

Member Function Documentation

◆ getNumEqs()

unsigned mlir::presburger::IntegerRelation::CountsSnapshot::getNumEqs ( ) const
inline

Definition at line 289 of file IntegerRelation.h.

Referenced by mlir::presburger::IntegerRelation::truncate().

◆ getNumIneqs()

unsigned mlir::presburger::IntegerRelation::CountsSnapshot::getNumIneqs ( ) const
inline

Definition at line 288 of file IntegerRelation.h.

Referenced by mlir::presburger::IntegerRelation::truncate().

◆ getSpace()

const PresburgerSpace& mlir::presburger::IntegerRelation::CountsSnapshot::getSpace ( ) const
inline

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