Skip to content
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

cleanup crates when rust generic_const_exprs is stabilized #57

Open
redshiftzero opened this issue Apr 3, 2024 · 0 comments
Open

cleanup crates when rust generic_const_exprs is stabilized #57

redshiftzero opened this issue Apr 3, 2024 · 0 comments

Comments

@redshiftzero
Copy link
Member

In #53, the crates in this workspace were rewritten to use const generics, for example the base Matrix became:

pub struct Matrix<const N_ROWS: usize, const N_COLS: usize, const N_ELEMENTS: usize> {
    /// Elements of the matrix, stored in a fixed-size array.
    ///
    pub elements: [Fq; N_ELEMENTS],
}

However, once the unstable Rust feature generic_const_exprs is stabilized, we'd be able to eliminate the N_ELEMENTS const generic parameter in favor of N_ROWS * N_COLS. Similarly for MDS matrices where we have a STATE_SIZE and STATE_SIZE_MINUS_1 parameter, we could eliminate STATE_SIZE_MINUS_1 in favor of using STATE_SIZE - 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant