-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/starkware-libs/stwo/541) <!-- Reviewable:end -->
- Loading branch information
Showing
5 changed files
with
62 additions
and
0 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
pub mod fibonacci; | ||
pub mod wide_fibonacci; |
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,38 @@ | ||
use super::structs::WideFibComponent; | ||
use crate::core::air::accumulation::{DomainEvaluationAccumulator, PointEvaluationAccumulator}; | ||
use crate::core::air::{Component, ComponentTrace, Mask}; | ||
use crate::core::backend::CPUBackend; | ||
use crate::core::circle::CirclePoint; | ||
use crate::core::fields::qm31::SecureField; | ||
use crate::core::ColumnVec; | ||
|
||
impl Component<CPUBackend> for WideFibComponent { | ||
fn max_constraint_log_degree_bound(&self) -> u32 { | ||
self.log_size + 1 | ||
} | ||
|
||
fn trace_log_degree_bounds(&self) -> Vec<u32> { | ||
vec![self.log_size; 256] | ||
} | ||
|
||
fn mask(&self) -> Mask { | ||
Mask(vec![vec![0_usize]; 256]) | ||
} | ||
|
||
fn evaluate_constraint_quotients_on_domain( | ||
&self, | ||
_trace: &ComponentTrace<'_, CPUBackend>, | ||
_evaluation_accumulator: &mut DomainEvaluationAccumulator<CPUBackend>, | ||
) { | ||
unimplemented!("not implemented") | ||
} | ||
|
||
fn evaluate_constraint_quotients_at_point( | ||
&self, | ||
_point: CirclePoint<SecureField>, | ||
_mask: &ColumnVec<Vec<SecureField>>, | ||
_evaluation_accumulator: &mut PointEvaluationAccumulator, | ||
) { | ||
unimplemented!("not implemented") | ||
} | ||
} |
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,3 @@ | ||
pub mod constraint_eval; | ||
pub mod structs; | ||
pub mod trace_gen; |
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,13 @@ | ||
use crate::core::fields::m31::BaseField; | ||
|
||
/// Component that computes fibonacci numbers over 64 columns. | ||
pub struct WideFibComponent { | ||
pub log_size: u32, | ||
} | ||
|
||
// Input for the fibonacci claim. | ||
#[derive(Debug, Clone, Copy)] | ||
pub struct Input { | ||
pub a: BaseField, | ||
pub b: BaseField, | ||
} |
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,7 @@ | ||
use super::structs::Input; | ||
use crate::core::fields::m31::BaseField; | ||
|
||
/// Given a private input, write the trace row for the wide Fibonacci example to dst. | ||
pub fn write_trace_row(_dst: &mut [Vec<BaseField>], _private_input: &Input, _row_offset: usize) { | ||
unimplemented!() | ||
} |