Files
concrete/compiler/lib/CAPI/Dialect/HLFHE.cpp
Ayoub Benaissa ab53ef71c6 feat(compiler): Python bindings (#53)
- feat(compiler): python bindings
- build: update docker image for python bindings
- pin pybind11 to 2.6.2, 2.7 is not having correct include_dirs set (still
a question why?)
- using generated parser/printer
2021-07-28 15:58:51 +01:00

28 lines
991 B
C++

#include "zamalang-c/Dialect/HLFHE.h"
#include "mlir/CAPI/IR.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/CAPI/Support.h"
#include "zamalang/Dialect/HLFHE/IR/HLFHEDialect.h"
#include "zamalang/Dialect/HLFHE/IR/HLFHEOps.h"
#include "zamalang/Dialect/HLFHE/IR/HLFHETypes.h"
using namespace mlir::zamalang::HLFHE;
//===----------------------------------------------------------------------===//
// Dialect API.
//===----------------------------------------------------------------------===//
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(HLFHE, hlfhe, HLFHEDialect)
//===----------------------------------------------------------------------===//
// Type API.
//===----------------------------------------------------------------------===//
bool hlfheTypeIsAnEncryptedIntegerType(MlirType type) {
return unwrap(type).isa<EncryptedIntegerType>();
}
MlirType hlfheEncryptedIntegerTypeGet(MlirContext ctx, unsigned width) {
return wrap(EncryptedIntegerType::get(unwrap(ctx), width));
}