Skip to content

Commit

Permalink
use uninitialized memory
Browse files Browse the repository at this point in the history
  • Loading branch information
gswirski committed Nov 27, 2024
1 parent 849569d commit 300b7e8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions prover/src/gpu/cuda/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! This module contains GPU acceleration logic for Nvidia CUDA devices.
use std::{cell::RefCell, marker::PhantomData};
use std::{cell::RefCell, marker::PhantomData, mem::MaybeUninit};

use air::{AuxRandElements, PartitionOptions};
use miden_gpu::{cuda::{constraint::CudaConstraintCommitment, merkle::MerkleTree, trace_lde::CudaTraceLde}, HashFn};
Expand Down Expand Up @@ -33,9 +33,9 @@ where
D: Digest + From<[Felt; DIGEST_SIZE]> + Into<[Felt; DIGEST_SIZE]>,
R: RandomCoin<BaseField = Felt, Hasher = H> + Send,
{
main: RefCell<&'g mut [Felt]>,
aux: RefCell<&'g mut [Felt]>,
ce: RefCell<&'g mut [Felt]>,
main: RefCell<&'g mut [MaybeUninit<Felt>]>,
aux: RefCell<&'g mut [MaybeUninit<Felt>]>,
ce: RefCell<&'g mut [MaybeUninit<Felt>]>,

pub execution_prover: ExecutionProver<H, R>,
pub hash_fn: HashFn,
Expand All @@ -48,7 +48,7 @@ where
D: Digest + From<[Felt; DIGEST_SIZE]> + Into<[Felt; DIGEST_SIZE]>,
R: RandomCoin<BaseField = Felt, Hasher = H> + Send,
{
pub fn new(execution_prover: ExecutionProver<H, R>, hash_fn: HashFn, main: &'g mut [Felt], aux: &'g mut [Felt], ce: &'g mut [Felt]) -> Self {
pub fn new(execution_prover: ExecutionProver<H, R>, hash_fn: HashFn, main: &'g mut [MaybeUninit<Felt>], aux: &'g mut [MaybeUninit<Felt>], ce: &'g mut [MaybeUninit<Felt>]) -> Self {
CudaExecutionProver {
main: RefCell::new(main),
aux: RefCell::new(aux),
Expand Down

0 comments on commit 300b7e8

Please sign in to comment.