MLIR  19.0.0git
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mlir::SaturatedInteger Struct Reference

Idiomatic saturated operations on values like offsets, sizes, and strides. More...

#include "mlir/Dialect/Utils/StaticValueUtils.h"

Public Member Functions

int64_t asInteger ()
 
FailureOr< SaturatedIntegerdesaturate (SaturatedInteger other)
 
bool operator== (SaturatedInteger other)
 
bool operator!= (SaturatedInteger other)
 
SaturatedInteger operator+ (SaturatedInteger other)
 
SaturatedInteger operator* (SaturatedInteger other)
 

Static Public Member Functions

static SaturatedInteger wrap (int64_t v)
 

Public Attributes

bool saturated = true
 
int64_t v = 0
 

Detailed Description

Idiomatic saturated operations on values like offsets, sizes, and strides.

Definition at line 179 of file StaticValueUtils.h.

Member Function Documentation

◆ asInteger()

int64_t mlir::SaturatedInteger::asInteger ( )
inline

Definition at line 184 of file StaticValueUtils.h.

References saturated, and v.

◆ desaturate()

FailureOr<SaturatedInteger> mlir::SaturatedInteger::desaturate ( SaturatedInteger  other)
inline

Definition at line 185 of file StaticValueUtils.h.

References saturated, and v.

◆ operator!=()

bool mlir::SaturatedInteger::operator!= ( SaturatedInteger  other)
inline

Definition at line 196 of file StaticValueUtils.h.

◆ operator*()

SaturatedInteger mlir::SaturatedInteger::operator* ( SaturatedInteger  other)
inline

Definition at line 202 of file StaticValueUtils.h.

References saturated, and v.

◆ operator+()

SaturatedInteger mlir::SaturatedInteger::operator+ ( SaturatedInteger  other)
inline

Definition at line 197 of file StaticValueUtils.h.

References saturated, and v.

◆ operator==()

bool mlir::SaturatedInteger::operator== ( SaturatedInteger  other)
inline

Definition at line 192 of file StaticValueUtils.h.

References saturated, and v.

◆ wrap()

static SaturatedInteger mlir::SaturatedInteger::wrap ( int64_t  v)
inlinestatic

Definition at line 180 of file StaticValueUtils.h.

References v.

Referenced by computeCollapsedLayoutMap(), and computeExpandedLayoutMap().

Member Data Documentation

◆ saturated

bool mlir::SaturatedInteger::saturated = true

Definition at line 213 of file StaticValueUtils.h.

Referenced by asInteger(), desaturate(), operator*(), operator+(), and operator==().

◆ v

int64_t mlir::SaturatedInteger::v = 0

Definition at line 214 of file StaticValueUtils.h.

Referenced by asInteger(), desaturate(), operator*(), operator+(), operator==(), and wrap().


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