mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 20:25:34 -05:00
enhance(compiler/lowlfhe): Give the runtime context as function argument instead of a global variable (close #195)
This commit is contained in:
@@ -125,8 +125,11 @@ createClientParametersForV0(V0FHEContext fheContext, llvm::StringRef name,
|
||||
|
||||
// Create input and output circuit gate parameters
|
||||
auto funcType = (*funcOp).getType();
|
||||
for (auto inType : funcType.getInputs()) {
|
||||
auto gate = gateFromMLIRType("big", precision, encryptionVariance, inType);
|
||||
bool hasContext =
|
||||
funcType.getInputs().back().isa<mlir::zamalang::LowLFHE::ContextType>();
|
||||
for (auto inType = funcType.getInputs().begin();
|
||||
inType < funcType.getInputs().end() - hasContext; inType++) {
|
||||
auto gate = gateFromMLIRType("big", precision, encryptionVariance, *inType);
|
||||
if (auto err = gate.takeError()) {
|
||||
return std::move(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user