MLIR
20.0.0git
|
#include "mlir/Dialect/Polynomial/IR/PolynomialOps.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/Polynomial/IR/Polynomial.h"
#include "mlir/Dialect/Polynomial/IR/PolynomialAttributes.h"
#include "mlir/Dialect/Polynomial/IR/PolynomialTypes.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/PatternMatch.h"
#include "llvm/ADT/APInt.h"
#include "PolynomialCanonicalization.inc"
Go to the source code of this file.
Functions | |
bool | isPrimitiveNthRootOfUnity (const APInt &root, const APInt &n, const APInt &cmod) |
Test if a value is a primitive nth root of unity modulo cmod. More... | |
static LogicalResult | verifyNTTOp (Operation *op, RingAttr ring, RankedTensorType tensorType, std::optional< PrimitiveRootAttr > root) |
Verify that the types involved in an NTT or INTT operation are compatible. More... | |
bool isPrimitiveNthRootOfUnity | ( | const APInt & | root, |
const APInt & | n, | ||
const APInt & | cmod | ||
) |
Test if a value is a primitive nth root of unity modulo cmod.
Definition at line 114 of file PolynomialOps.cpp.
References max().
Referenced by verifyNTTOp().
|
static |
Verify that the types involved in an NTT or INTT operation are compatible.
Definition at line 136 of file PolynomialOps.cpp.
References diag(), mlir::Operation::emitOpError(), and isPrimitiveNthRootOfUnity().