Skip to content

Commit 5ef238b

Browse files
rnburnvipocenka
andauthored
refactor: fix typos (#246)
* fix typo backend.cc * fix typos reduce.t.cc * fix typos exponent_aggregates_computation.cc * reformat --------- Co-authored-by: Ocenka <[email protected]>
1 parent 055e1df commit 5ef238b

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

cbindings/backend.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static void try_get_environ_backend(int& backend) noexcept {
7575
return;
7676
}
7777
std::string s{val};
78-
basl::info("override default backend with environmental varaible BLITZAR_BACKEND={}", s);
78+
basl::info("override default backend with environmental variable BLITZAR_BACKEND={}", s);
7979
for (auto& c : s) {
8080
c = std::tolower(c);
8181
}

sxt/multiexp/pippenger/exponent_aggregates_computation.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232

3333
namespace sxt::mtxpi {
3434
//--------------------------------------------------------------------------------------------------
35-
// aggegate_term
35+
// aggregate_term
3636
//--------------------------------------------------------------------------------------------------
37-
static void aggegate_term(exponent_aggregates& aggregates, basct::cspan<uint8_t> term,
38-
size_t output_index, size_t term_index) noexcept {
37+
static void aggregate_term(exponent_aggregates& aggregates, basct::cspan<uint8_t> term,
38+
size_t output_index, size_t term_index) noexcept {
3939
basbt::or_equal(aggregates.term_or_all[term_index], term);
4040
basbt::or_equal(aggregates.output_or_all[output_index], term);
4141
basbt::max_equal(aggregates.max_exponent, term);
@@ -50,7 +50,7 @@ static void aggregate_unsigned_terms(exponent_aggregates& aggregates, size_t out
5050
auto element_nbytes = sequence.element_nbytes;
5151
for (size_t term_index = 0; term_index < sequence.n; ++term_index) {
5252
basct::cspan<uint8_t> term{sequence.data + term_index * element_nbytes, element_nbytes};
53-
aggegate_term(aggregates, term, output_index, term_index);
53+
aggregate_term(aggregates, term, output_index, term_index);
5454
}
5555
}
5656

@@ -66,9 +66,9 @@ static void aggregate_signed_terms(exponent_aggregates& aggregates, size_t outpu
6666
auto abs_x = basn::abs_to_unsigned(x);
6767
basct::cspan<uint8_t> term{reinterpret_cast<uint8_t*>(&abs_x), NumBytes};
6868
if (x >= 0) {
69-
aggegate_term(aggregates, term, output_index, term_index);
69+
aggregate_term(aggregates, term, output_index, term_index);
7070
} else {
71-
aggegate_term(aggregates, term, output_index + 1, term_index);
71+
aggregate_term(aggregates, term, output_index + 1, term_index);
7272
}
7373
}
7474
}

sxt/scalar25/operation/reduce.t.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,39 +76,39 @@ TEST_CASE("we correctly reduces arrays with 64 bytes") {
7676
element s = 0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ec_s25;
7777
element expected_s = s;
7878
uint8_t s_data[64] = {};
79-
std::memcpy(s_data, s.data(), 32); // we copy the 32 bytes to the begginning of s_data
79+
std::memcpy(s_data, s.data(), 32); // we copy the 32 bytes to the beginning of s_data
8080
reduce64(s, s_data);
8181
REQUIRE(s == expected_s);
8282
}
8383

8484
SECTION("we correctly reduce A when A = L (L = the field order)") {
8585
element s = 0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed_s25;
8686
uint8_t s_data[64] = {};
87-
std::memcpy(s_data, s.data(), 32); // we copy the 32 bytes to the begginning of s_data
87+
std::memcpy(s_data, s.data(), 32); // we copy the 32 bytes to the beginning of s_data
8888
reduce64(s, s_data);
8989
REQUIRE(s == 0x0_s25);
9090
}
9191

9292
SECTION("we correctly reduce A when A = L + 103 (L = the field order)") {
9393
element s = 0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d454_s25;
9494
uint8_t s_data[64] = {};
95-
std::memcpy(s_data, s.data(), 32); // we copy the 32 bytes to the begginning of s_data
95+
std::memcpy(s_data, s.data(), 32); // we copy the 32 bytes to the beginning of s_data
9696
reduce64(s, s_data);
9797
REQUIRE(s == 0x67_s25);
9898
}
9999

100100
SECTION("we correctly reduce A when A is the biggest 256bits integer") {
101101
element s = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_s25;
102102
uint8_t s_data[64] = {};
103-
std::memcpy(s_data, s.data(), 32); // we copy the 32 bytes to the begginning of s_data
103+
std::memcpy(s_data, s.data(), 32); // we copy the 32 bytes to the beginning of s_data
104104
reduce64(s, s_data);
105105
REQUIRE(s == 0xffffffffffffffffffffffffffffffec6ef5bf4737dcf70d6ec31748d98951c_s25);
106106
}
107107

108108
SECTION("we correctly reduce A when A is the biggest 512bits integer") {
109109
element s = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff_s25;
110110
uint8_t s_data[64] = {};
111-
std::memcpy(s_data, s.data(), 32); // we copy the 32 bytes to the begginning of s_data
111+
std::memcpy(s_data, s.data(), 32); // we copy the 32 bytes to the beginning of s_data
112112
std::memcpy(s_data + 32, s.data(), 32); // we copy the 32 bytes to the end of s_data
113113
reduce64(s, s_data);
114114
REQUIRE(s == 0x399411b7c309a3dceec73d217f5be65d00e1ba768859347a40611e3449c0f00_s25);

0 commit comments

Comments
 (0)