Skip to content

Commit 9756db9

Browse files
Raimo33Claudio Raimondi
authored andcommitted
Add TODOs [skip ci]
1 parent f16528f commit 9756db9

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

src/field_10x26_impl.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ static int secp256k1_fe_impl_normalizes_to_zero_var(const secp256k1_fe *r) {
261261

262262
SECP256K1_INLINE static void secp256k1_fe_impl_set_int(secp256k1_fe *r, int a) {
263263
r->n[0] = a;
264+
265+
/* TODO: parallelize, SSE2 (32bit cpu only) */
266+
264267
r->n[1] = r->n[2] = r->n[3] = r->n[4] = r->n[5] = r->n[6] = r->n[7] = r->n[8] = r->n[9] = 0;
265268
}
266269

src/field_5x52_impl.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ SECP256K1_INLINE static void secp256k1_fe_impl_set_int(secp256k1_fe *r, int a) {
224224

225225
SECP256K1_INLINE static int secp256k1_fe_impl_is_zero(const secp256k1_fe *a) {
226226
const uint64_t *t = a->n;
227+
228+
/* TODO: parallelize. mm_testz */
229+
227230
return (t[0] | t[1] | t[2] | t[3] | t[4]) == 0;
228231
}
229232

src/hash_impl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ static void secp256k1_sha256_initialize(secp256k1_sha256 *hash) {
3838
0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,
3939
0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
4040
);
41-
_mm256_storeu_si256((__m256i*)hash->s, vec);
41+
_mm256_storeu_si256((__m256i *)hash->s, vec);
4242
#elif defined(__SSE2__)
4343
const __m128i vec1 = _mm_setr_epi32(0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a); /* TODO: precompute */
4444
const __m128i vec2 = _mm_setr_epi32(0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19); /* TODO: precompute */
45-
_mm_storeu_si128((__m128i*)hash->s, vec1);
46-
_mm_storeu_si128((__m128i*)(hash->s + 4), vec2);
45+
_mm_storeu_si128((__m128i *)hash->s, vec1);
46+
_mm_storeu_si128((__m128i *)(hash->s + 4), vec2);
4747
#else
4848
hash->s[0] = 0x6a09e667ul;
4949
hash->s[1] = 0xbb67ae85ul;

src/modinv32_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static void secp256k1_modinv32_normalize_30(secp256k1_modinv32_signed30 *r, int3
8080
VERIFY_CHECK(secp256k1_modinv32_mul_cmp_30(r, 9, &modinfo->modulus, 1) < 0); /* r < modulus */
8181
#endif
8282

83-
/* TODO: parallelize */
83+
/* TODO: parallelize, SSE2 (32bit cpu only) */
8484

8585
/* In a first step, add the modulus if the input is negative, and then negate if requested.
8686
* This brings r from range (-2*modulus,modulus) to range (-modulus,modulus). As all input

0 commit comments

Comments
 (0)