forked from iden3/circom
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
P:MediumMedium PriorityMedium PrioritybugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
Current handling of template parameters in llzk_backend/src/module.rs is as follows:
// Insert Operations to read templated struct parameters into an SSA Value in each function.
// This ensures the struct parameter is available as a Value in the block context.
for name in struct_params.into_iter() {
compute_ctx.block_ctx.declare_name_if_not_present(name, || {
Ok(poly::read_const(struct_loc, name, codegen.felt_type().into()))
})?;
constrain_ctx.block_ctx.declare_name_if_not_present(name, || {
Ok(poly::read_const(struct_loc, name, codegen.felt_type().into()))
})?;
}
However, template parameters can also be arrays:
pragma circom 2.0.0;
template T(N) {
signal output out <== N[1][1];
}
component main = T([[1,2],[3,4]]);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P:MediumMedium PriorityMedium PrioritybugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed