refactor(compiler): Rename SubIntGLWEOp to SubGLWEIntOp

Rename `SubIntGLWEOp` to `SubGLWEIntOp` for a consistent naming scheme
of all TFHE ops.
This commit is contained in:
Andi Drebes
2022-06-13 11:18:12 +02:00
parent 45577fb79e
commit 3b8ea630a1
5 changed files with 8 additions and 8 deletions

View File

@@ -24,11 +24,11 @@ def AddEintPattern : Pat<
(AddEintOp:$result $arg0, $arg1),
(createAddGLWEOp $arg0, $arg1, $result)>;
def createSubIntGLWEOp : NativeCodeCall<"mlir::concretelang::createGLWEOpFromFHE<mlir::concretelang::TFHE::SubIntGLWEOp>($_builder, $_loc, $0, $1, $2)">;
def createSubGLWEIntOp : NativeCodeCall<"mlir::concretelang::createGLWEOpFromFHE<mlir::concretelang::TFHE::SubGLWEIntOp>($_builder, $_loc, $0, $1, $2)">;
def SubIntEintPattern : Pat<
(SubIntEintOp:$result $arg0, $arg1),
(createSubIntGLWEOp $arg0, $arg1, $result)>;
(createSubGLWEIntOp $arg0, $arg1, $result)>;
def createNegGLWEOp : NativeCodeCall<"mlir::concretelang::createGLWEOpFromFHE<mlir::concretelang::TFHE::NegGLWEOp>($_builder, $_loc, $0, $1)">;

View File

@@ -32,8 +32,8 @@ def MulGLWEIntPattern : Pat<
def createSubIntLweOp : NativeCodeCall<"mlir::concretelang::createSubIntLweCiphertext($_builder, $_loc, $0, $1, $2)">;
def SubIntGLWEPattern : Pat<
(SubIntGLWEOp:$result $arg0, $arg1),
def SubGLWEIntPattern : Pat<
(SubGLWEIntOp:$result $arg0, $arg1),
(createSubIntLweOp $arg0, $arg1, $result)>;
def createNegLweOp : NativeCodeCall<"mlir::concretelang::createNegLweCiphertext($_builder, $_loc, $0, $1)">;

View File

@@ -51,7 +51,7 @@ def AddGLWEOp : TFHE_Op<"add_glwe"> {
let hasVerifier = 1;
}
def SubIntGLWEOp : TFHE_Op<"sub_int_glwe"> {
def SubGLWEIntOp : TFHE_Op<"sub_int_glwe"> {
let summary = "Substracts an integer and a GLWE ciphertext";
let arguments = (ins AnyInteger : $a, GLWECipherTextType : $b);

View File

@@ -239,7 +239,7 @@ void populateWithTFHEOpTypeConversionPatterns(
populateWithTFHEOpTypeConversionPattern<mlir::concretelang::TFHE::AddGLWEOp>(
patterns, target, typeConverter);
populateWithTFHEOpTypeConversionPattern<
mlir::concretelang::TFHE::SubIntGLWEOp>(patterns, target, typeConverter);
mlir::concretelang::TFHE::SubGLWEIntOp>(patterns, target, typeConverter);
populateWithTFHEOpTypeConversionPattern<mlir::concretelang::TFHE::NegGLWEOp>(
patterns, target, typeConverter);
populateWithTFHEOpTypeConversionPattern<

View File

@@ -150,8 +150,8 @@ mlir::LogicalResult AddGLWEOp::verify() {
return ::mlir::concretelang::TFHE::verifyBinaryGLWEOperator<AddGLWEOp>(*this);
}
mlir::LogicalResult SubIntGLWEOp::verify() {
return ::mlir::concretelang::TFHE::verifyIntegerGLWEOperator<SubIntGLWEOp>(
mlir::LogicalResult SubGLWEIntOp::verify() {
return ::mlir::concretelang::TFHE::verifyIntegerGLWEOperator<SubGLWEIntOp>(
*this);
}