Skip to content

Commit 16fd90a

Browse files
committed
Add citations to the original author's work
Add citations to the original author's work Signed-off-by: chzhoo <[email protected]>
1 parent e137df5 commit 16fd90a

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/bitops.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ static const unsigned char bitsinbyte[256] = {
4646
6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8};
4747

4848
#ifdef HAVE_AVX2
49-
/* The SIMD version of popcount enhances performance through parallel lookup tables. */
49+
/* The SIMD version of popcount enhances performance through parallel lookup tables which is based on the following article:
50+
* https://arxiv.org/pdf/1611.07612 */
5051
ATTRIBUTE_TARGET_AVX2
5152
long long popcountAVX2(void *s, long count) {
5253
long i = 0;
@@ -92,7 +93,7 @@ long long popcountAVX2(void *s, long count) {
9293
* +-----------------+--------------+---------+
9394
*/
9495

95-
/* Parrt A: loop unrolling, processing 8 * 32 bytes per iteration. */
96+
/* Part A: loop unrolling, processing 8 * 32 bytes per iteration. */
9697
while (i + 8 * 32 <= count) {
9798
__m256i local = _mm256_setzero_si256();
9899
ITER_32_BYTES

src/unit/test_bitops.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ int test_popcount(int argc, char **argv, int flags) {
4949
UNUSED(argv);
5050
UNUSED(flags);
5151

52-
time_t seed = time(NULL);
53-
srandom(seed);
54-
TEST_PRINT_INFO("Verify the popcount through fuzz testing,"
55-
" the random number seed is %jd.",
56-
(intmax_t)seed);
57-
5852
#define TEST_CASE(MSG, SIZE) \
5953
if (test_case("Test failed: " MSG, SIZE)) { \
6054
return 1; \

0 commit comments

Comments
 (0)