Skip to content

Commit 9f4ded2

Browse files
authored
fix: multiple typos of different importance (#292)
* Update utils.rs * Update r1cs_file.rs * Update r1cs_file.rs * Update avx2_field_gl.rs * Update plonk_setup.rs
1 parent 076b1c6 commit 9f4ded2

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

algebraic-gpu/src/r1cs_file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ pub fn from_reader<R: Read + Seek, E: PrimeField>(mut reader: R) -> Result<R1CSF
206206
let mut section_offsets = BTreeMap::<u32, u64>::new();
207207
let mut section_sizes = BTreeMap::<u32, u64>::new();
208208

209-
// get file offset of each section, we donot support custom gate yet, so ignore the
209+
// get file offset of each section, we do not support custom gate yet, so ignore the
210210
// last two sections.
211211
for i in 0..(num_sections) {
212212
let section_type = reader.read_u32::<LittleEndian>()?;

algebraic/src/r1cs_file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ pub fn from_reader<R: Read + Seek, E: ScalarEngine>(mut reader: R) -> Result<R1C
201201
let mut section_offsets = BTreeMap::<u32, u64>::new();
202202
let mut section_sizes = BTreeMap::<u32, u64>::new();
203203

204-
// get file offset of each section, we donot support custom gate yet, so ignore the
204+
// get file offset of each section, we do not support custom gate yet, so ignore the
205205
// last two sections.
206206
for i in 0..(num_sections) {
207207
let section_type = reader.read_u32::<LittleEndian>()?;

algebraic/src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ fn from_double_size_limb_witnesses<E: Engine, F: PrimeField>(
112112
biguint_to_fe(this_value)
113113
}
114114

115-
// refer to plonk/circuit/bigint/field, merge the limbs into prime field without allocting
115+
// refer to plonk/circuit/bigint/field, merge the limbs into prime field without allocating
116116
// inside a cs
117117
pub fn witness_to_field<E: Engine, F: PrimeField>(
118118
limbs: &[BigUint],

fields/src/arch/x86_64/avx2_field_gl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ unsafe fn add_small_64s_64_s(x_s: __m256i, y: __m256i) -> __m256i {
433433
// 0xffffffff and the addition of the low 32 bits generated a carry. This can never occur if y
434434
// <= 0xffffffff00000000: if y >> 32 = 0xffffffff, then no carry can occur.
435435
let mask = _mm256_cmpgt_epi32(x_s, res_wrapped_s); // -1 if overflowed else 0.
436-
// The mask contains 0xffffffff in the high 32 bits if wraparound occured and 0 otherwise.
436+
// The mask contains 0xffffffff in the high 32 bits if wraparound occurred and 0 otherwise.
437437
let wrapback_amt = _mm256_srli_epi64::<32>(mask); // -FIELD_ORDER if overflowed else 0.
438438
let res_s = _mm256_add_epi64(res_wrapped_s, wrapback_amt);
439439
res_s
@@ -450,7 +450,7 @@ unsafe fn sub_small_64s_64_s(x_s: __m256i, y: __m256i) -> __m256i {
450450
// 0xffffffff and the subtraction of the low 32 bits generated a borrow. This can never occur if
451451
// y <= 0xffffffff00000000: if y >> 32 = 0xffffffff, then no borrow can occur.
452452
let mask = _mm256_cmpgt_epi32(res_wrapped_s, x_s); // -1 if underflowed else 0.
453-
// The mask contains 0xffffffff in the high 32 bits if wraparound occured and 0 otherwise.
453+
// The mask contains 0xffffffff in the high 32 bits if wraparound occurred and 0 otherwise.
454454
let wrapback_amt = _mm256_srli_epi64::<32>(mask); // -FIELD_ORDER if underflowed else 0.
455455
let res_s = _mm256_sub_epi64(res_wrapped_s, wrapback_amt);
456456
res_s

recursion/src/compressor12/plonk_setup.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ impl PlonkSetup {
4545
#[derive(Debug)]
4646
pub(crate) struct NormalPlonkInfo {
4747
pub N: usize,
48-
// never used fileds
49-
// pub n_constaints: usize,
48+
// never used fields
49+
// pub n_constraints: usize,
5050
// pub n_plonk_gates: usize,
5151
// pub n_plonk_adds: usize,
5252
}
@@ -71,7 +71,7 @@ impl NormalPlonkInfo {
7171

7272
Self {
7373
N,
74-
// n_constaints: r1cs.constraints.len(),
74+
// n_constraints: r1cs.constraints.len(),
7575
// n_plonk_gates: plonk_constrains_len,
7676
// n_plonk_adds: plonk_additions.len(),
7777
}
@@ -342,7 +342,7 @@ pub fn plonk_setup_compressor(
342342
}
343343
}
344344

345-
// Terminate the empty rows (Copyn the same constraint)
345+
// Terminate the empty rows (Copy the same constraint)
346346
for (_, pr) in partial_rows.iter_mut() {
347347
if pr.n_used == 1 {
348348
s_map[3][pr.row] = s_map[0][pr.row];
@@ -564,7 +564,7 @@ pub fn plonk_setup_compressor(
564564
);
565565
}
566566
} else {
567-
panic!("invalit FFT4 type: {t}");
567+
panic!("invalid FFT4 type: {t}");
568568
}
569569

570570
let index = r;

0 commit comments

Comments
 (0)