-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[experiment] Remove PROGRAM_SIZE from type #587
base: master
Are you sure you want to change the base?
Conversation
ceno_zkvm/src/structs.rs
Outdated
@@ -152,10 +152,10 @@ impl<E: ExtensionField> ZKVMConstraintSystem<E> { | |||
config | |||
} | |||
|
|||
pub fn register_table_circuit<TC: TableCircuit<E>>(&mut self) -> TC::TableConfig { | |||
pub fn register_table_circuit<TC: TableCircuit<E>>(&mut self, tc: TC) -> TC::TableConfig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There could be a convenience method (original name) that uses Default (if implemented) and a new one with the parameter.
impl<TC> …
where TC::TableConfig: Default {
pub fn register_table_circuit(…) {
let tc = Default::default();
…
}
impl<TC> … {
pub fn register_table_circuit_param(…, tc: TC) {
…
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way there is no need to change every call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 agreed, got a bit carried away there
naure: