RNS

RNS types

RNSType

A residue number system representation

Syntax:

!rns.rns<
  ::llvm::ArrayRef<mlir::Type>   # basisTypes
>

Parameters:

ParameterC++ typeDescription
basisTypes::llvm::ArrayRef<mlir::Type>

RNS ops

RNS additional definitions

TypeInterface definitions

RNSBasisTypeInterface (RNSBasisTypeInterface)

This interface is required for a type to be used as a parameter to an rns type.

Methods:

isCompatibleWith

bool isCompatibleWith(::mlir::Type otherRnsBasisType);

Returns true if this type is compatible with another type in the same RNS basis. In particular, the set of types used for a single RNS basis are never equal as types, but instead have some common attribute that must be checked here. For example, an RNS type where the basis types are polynomials would return true if the two types are both polynomial types, even if they have different coefficient moduli.

isCompatibleWith must be both commutative and associative, in the sense that type1.isCompatibleWith(type2) if and only if type2.isCompatibleWith(type1), and further type2.isCompatibleWith(type3) if and only if type1.isCompatibleWith(type3).

NOTE: This method must be implemented by the user.