Skip to content

noir-r1cs/src/utils/mod: Cleanup when <https://github.com/rust-lang/rust/issues/96097> lands #78

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

Open
recmo opened this issue May 21, 2025 · 0 comments
Assignees
Labels
to do To do comments in code tracker 🤖 issue managed by tracker bot

Comments

@recmo
Copy link
Contributor

recmo commented May 21, 2025

On 2025-05-21 @recmo wrote in 3e2e388 “Add PAT”:

Cleanup when rust-lang/rust#96097 lands
Required for MaybeUninit

    const CACHE_SIZE: usize = 1 << 15;
    CACHE_SIZE / size_of::<T>()
}

/// Unzip a [[(T,T); N]; M] into ([[T; N]; M],[[T; N]; M]) using move semantics
// TODO: Cleanup when <https://github.com/rust-lang/rust/issues/96097> lands
#[allow(unsafe_code)] // Required for `MaybeUninit`
fn unzip_double_array<T: Sized, const N: usize, const M: usize>(
    input: [[(T, T); N]; M],
) -> ([[T; N]; M], [[T; N]; M]) {
    // Create uninitialized memory for the output arrays
    let mut left: [[MaybeUninit<T>; N]; M] = [const { [const { MaybeUninit::uninit() }; N] }; M];

From noir-r1cs/src/utils/mod.rs:35

@recmo recmo self-assigned this May 21, 2025
@recmo recmo added tracker 🤖 issue managed by tracker bot to do To do comments in code labels May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to do To do comments in code tracker 🤖 issue managed by tracker bot
Projects
None yet
Development

No branches or pull requests

1 participant