forked from powdr-labs/powdr
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'avm' into md/merge-upstream
- Loading branch information
Showing
10 changed files
with
367 additions
and
413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
use crate::file_writer::BBFiles; | ||
|
||
pub trait ArithmetizationBuilder { | ||
fn create_arith_hpp(&mut self, name: &str, num_cols: usize); | ||
} | ||
|
||
impl ArithmetizationBuilder for BBFiles { | ||
// We have no selectors so we can easily create a boilerplate file | ||
fn create_arith_hpp(&mut self, name: &str, num_cols: usize) { | ||
let arith = format!( | ||
" | ||
#pragma once | ||
#include \"barretenberg/proof_system/arithmetization/arithmetization.hpp\" | ||
namespace arithmetization {{ | ||
class {name}Arithmetization : public Arithmetization<{num_cols}, 0> {{ | ||
public: | ||
using FF = barretenberg::fr; | ||
struct Selectors {{}}; | ||
}}; | ||
}} // namespace arithmetization | ||
" | ||
); | ||
self.arith_hpp = Some(arith); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.