| /lib/raid6/ |
| D | mktables.c | 55 int i, j, k; in main() local 70 for (j = 0; j < 256; j += 8) { in main() 73 printf("0x%02x,%c", gfmul(i, j + k), in main() 89 for (j = 0; j < 16; j += 8) { in main() 92 printf("0x%02x,%c", gfmul(i, j + k), in main() 95 for (j = 0; j < 16; j += 8) { in main() 98 printf("0x%02x,%c", gfmul(i, (j + k) << 4), in main() 114 for (j = 0; j < 8; j++) { in main() 115 exptbl[i + j] = v; in main() 116 printf("0x%02x,%c", v, (j == 7) ? '\n' : ' '); in main() [all …]
|
| /lib/ |
| D | gen_crc32table.c | 40 unsigned i, j; in crc32init_le_generic() local 47 for (j = 0; j < LE_TABLE_SIZE; j += 2 * i) in crc32init_le_generic() 48 tab[0][i + j] = crc ^ tab[0][j]; in crc32init_le_generic() 52 for (j = 1; j < LE_TABLE_ROWS; j++) { in crc32init_le_generic() 54 tab[j][i] = crc; in crc32init_le_generic() 74 unsigned i, j; in crc32init_be() local 81 for (j = 0; j < i; j++) in crc32init_be() 82 crc32table_be[0][i + j] = crc ^ crc32table_be[0][j]; in crc32init_be() 86 for (j = 1; j < BE_TABLE_ROWS; j++) { in crc32init_be() 88 crc32table_be[j][i] = crc; in crc32init_be() [all …]
|
| D | rbtree_test.c | 244 int i, j; in rbtree_test_init() local 260 for (j = 0; j < nnodes; j++) in rbtree_test_init() 261 insert(nodes + j, &root); in rbtree_test_init() 262 for (j = 0; j < nnodes; j++) in rbtree_test_init() 263 erase(nodes + j, &root); in rbtree_test_init() 276 for (j = 0; j < nnodes; j++) in rbtree_test_init() 277 insert_cached(nodes + j, &root); in rbtree_test_init() 278 for (j = 0; j < nnodes; j++) in rbtree_test_init() 279 erase_cached(nodes + j, &root); in rbtree_test_init() 335 for (j = 0; j < nnodes; j++) { in rbtree_test_init() [all …]
|
| D | hexdump.c | 133 int j, lx = 0; in hex_dump_to_buffer() local 159 for (j = 0; j < ngroups; j++) { in hex_dump_to_buffer() 161 "%s%16.16llx", j ? " " : "", in hex_dump_to_buffer() 162 get_unaligned(ptr8 + j)); in hex_dump_to_buffer() 170 for (j = 0; j < ngroups; j++) { in hex_dump_to_buffer() 172 "%s%8.8x", j ? " " : "", in hex_dump_to_buffer() 173 get_unaligned(ptr4 + j)); in hex_dump_to_buffer() 181 for (j = 0; j < ngroups; j++) { in hex_dump_to_buffer() 183 "%s%4.4x", j ? " " : "", in hex_dump_to_buffer() 184 get_unaligned(ptr2 + j)); in hex_dump_to_buffer() [all …]
|
| D | interval_tree_test.c | 64 int i, j; in interval_tree_test_init() local 87 for (j = 0; j < nnodes; j++) in interval_tree_test_init() 88 interval_tree_insert(nodes + j, &root); in interval_tree_test_init() 89 for (j = 0; j < nnodes; j++) in interval_tree_test_init() 90 interval_tree_remove(nodes + j, &root); in interval_tree_test_init() 101 for (j = 0; j < nnodes; j++) in interval_tree_test_init() 102 interval_tree_insert(nodes + j, &root); in interval_tree_test_init() 108 for (j = 0; j < nsearches; j++) { in interval_tree_test_init() 109 unsigned long start = search_all ? 0 : queries[j]; in interval_tree_test_init() 110 unsigned long last = search_all ? max_endpoint : queries[j]; in interval_tree_test_init()
|
| D | crc8.c | 31 int i, j; in crc8_populate_msb() local 39 for (j = 0; j < i; j++) in crc8_populate_msb() 40 table[i+j] = table[j] ^ t; in crc8_populate_msb() 53 int i, j; in crc8_populate_lsb() local 60 for (j = 0; j < CRC8_TABLE_SIZE; j += 2*i) in crc8_populate_lsb() 61 table[i+j] = table[j] ^ t; in crc8_populate_lsb()
|
| D | ucs2_string.c | 110 unsigned long j = 0; in ucs2_utf8size() local 116 j += 3; in ucs2_utf8size() 118 j += 2; in ucs2_utf8size() 120 j += 1; in ucs2_utf8size() 123 return j; in ucs2_utf8size() 138 unsigned long j = 0; in ucs2_as_utf8() local 148 dest[j++] = 0xe0 | (c & 0xf000) >> 12; in ucs2_as_utf8() 149 dest[j++] = 0x80 | (c & 0x0fc0) >> 6; in ucs2_as_utf8() 150 dest[j++] = 0x80 | (c & 0x003f); in ucs2_as_utf8() 155 dest[j++] = 0xc0 | (c & 0x7c0) >> 6; in ucs2_as_utf8() [all …]
|
| D | inflate.c | 342 register unsigned j; /* counter */ in huft_build() local 394 for (j = 1; j <= BMAX; j++) in huft_build() 395 if (c[j]) in huft_build() 397 k = j; /* minimum code length */ in huft_build() 398 if ((unsigned)l < j) in huft_build() 399 l = j; in huft_build() 411 for (y = 1 << j; j < i; j++, y <<= 1) in huft_build() 412 if ((y -= c[j]) < 0) { in huft_build() 425 x[1] = j = 0; in huft_build() 428 *xp++ = (j += *p++); in huft_build() [all …]
|
| D | bch.c | 373 int i, j, s; in compute_syndromes() local 392 for (j = 0; j < 2*t; j += 2) in compute_syndromes() 393 syn[j] ^= a_pow(bch, (j+1)*(i+s)); in compute_syndromes() 400 for (j = 0; j < t; j++) in compute_syndromes() 401 syn[2*j+1] = gf_sqr(bch, syn[j]); in compute_syndromes() 414 unsigned int i, j, tmp, l, pd = 1, d = syn[0]; in compute_error_locator_polynomial() local 435 for (j = 0; j <= pelp->deg; j++) { in compute_error_locator_polynomial() 436 if (pelp->c[j]) { in compute_error_locator_polynomial() 437 l = a_log(bch, pelp->c[j]); in compute_error_locator_polynomial() 438 elp->c[j+k] ^= a_pow(bch, tmp+l); in compute_error_locator_polynomial() [all …]
|
| D | test_hash.c | 148 int i, j; in test_string_or() local 153 for (j = SIZE; j > 0; --j) { in test_string_or() 154 buf[j] = '\0'; in test_string_or() 156 for (i = 0; i <= j; i++) { in test_string_or() 157 u32 h0 = full_name_hash(buf+i, buf+i, j-i); in test_string_or() 174 int i, j; in test_hash_or() local 179 for (j = SIZE; j > 0; --j) { in test_hash_or() 180 buf[j] = '\0'; in test_hash_or() 182 for (i = 0; i <= j; i++) { in test_hash_or() 184 u32 h0 = full_name_hash(buf+i, buf+i, j-i); in test_hash_or() [all …]
|
| D | decompress_bunzip2.c | 162 i, j, k, t, runPos, symCount, symTotal, nSelectors, *byteCount; in get_next_block() local 176 j = get_bits(bd, 24); in get_next_block() 178 if ((i == 0x177245) && (j == 0x385090)) in get_next_block() 180 if ((i != 0x314159) || (j != 0x265359)) in get_next_block() 200 for (j = 0; j < 16; j++) in get_next_block() 201 if (k&(1 << (15-j))) in get_next_block() 202 symToByte[symTotal++] = (16*i)+j; in get_next_block() 221 for (j = 0; get_bits(bd, 1); j++) in get_next_block() 222 if (j >= groupCount) in get_next_block() 225 uc = mtfSymbol[j]; in get_next_block() [all …]
|
| D | gen_crc64table.c | 27 uint64_t i, j, c, crc; in generate_reflected_crc64_table() local 33 for (j = 0; j < 8; j++) { in generate_reflected_crc64_table() 34 if ((crc ^ (c >> j)) & 1) in generate_reflected_crc64_table() 45 uint64_t i, j, c, crc; in generate_crc64_table() local 51 for (j = 0; j < 8; j++) { in generate_crc64_table()
|
| D | hashtable_test.c | 127 int bkt, i, j, count; in hashtable_test_hash_for_each() local 148 for (j = 0; j < 3; j++) in hashtable_test_hash_for_each() 149 KUNIT_EXPECT_EQ(test, entries[j].visited, 1); in hashtable_test_hash_for_each() 157 int bkt, i, j, count; in hashtable_test_hash_for_each_safe() local 181 for (j = 0; j < 3; j++) in hashtable_test_hash_for_each_safe() 182 KUNIT_EXPECT_EQ(test, entries[j].visited, 1); in hashtable_test_hash_for_each_safe() 190 int bkt, i, j, count; in hashtable_test_hash_for_each_possible() local 216 for (j = 0; j < 3; j++) in hashtable_test_hash_for_each_possible() 217 KUNIT_EXPECT_EQ(test, entries[j].visited, 1); in hashtable_test_hash_for_each_possible() 245 int bkt, i, j, count; in hashtable_test_hash_for_each_possible_safe() local [all …]
|
| D | string_kunit.c | 22 unsigned i, j, k; in string_test_memset16() local 29 for (j = 0; j < 256; j++) { in string_test_memset16() 31 memset16(p + i, 0xb1b2, j); in string_test_memset16() 36 "i:%d j:%d k:%d", i, j, k); in string_test_memset16() 37 } else if (k < i + j) { in string_test_memset16() 39 "i:%d j:%d k:%d", i, j, k); in string_test_memset16() 42 "i:%d j:%d k:%d", i, j, k); in string_test_memset16() 51 unsigned i, j, k; in string_test_memset32() local 58 for (j = 0; j < 256; j++) { in string_test_memset32() 60 memset32(p + i, 0xb1b2b3b4, j); in string_test_memset32() [all …]
|
| D | oid_registry.c | 31 unsigned i, j, k, hash; in look_up_OID() local 49 j = (i + k) / 2; in look_up_OID() 51 xhash = oid_search_table[j].hash; in look_up_OID() 53 k = j; in look_up_OID() 57 i = j + 1; in look_up_OID() 61 oid = oid_search_table[j].oid; in look_up_OID() 64 k = j; in look_up_OID() 68 i = j + 1; in look_up_OID() 79 k = j; in look_up_OID() 83 i = j + 1; in look_up_OID()
|
| D | crc32test.c | 711 int i, j; in crc32c_combine_test() local 719 for (j = 0; j <= test[i].length; ++j) { in crc32c_combine_test() 721 u32 len1 = j, len2 = test[i].length - j; in crc32c_combine_test() 799 int i, j; in crc32_combine_test() local 807 for (j = 0; j <= test[i].length; ++j) { in crc32_combine_test() 809 u32 len1 = j, len2 = test[i].length - j; in crc32_combine_test()
|
| /lib/reed_solomon/ |
| D | decode_rs.c | 15 int i, j, r, k, pad; variable 64 for (j = 1; j < len; j++) { 67 syn[i] = (((uint16_t) data[j]) ^ 70 syn[i] = ((((uint16_t) data[j]) ^ 78 for (j = 0; j < nroots; j++) { 81 syn[i] = ((uint16_t) par[j]) & msk; 83 syn[i] = (((uint16_t) par[j]) & msk) ^ 115 for (j = i + 1; j > 0; j--) { 116 tmp = index_of[lambda[j - 1]]; 118 lambda[j] ^= [all …]
|
| /lib/raid6/test/ |
| D | test.c | 30 int i, j; in makedata() local 33 for (j = 0; j < PAGE_SIZE; j++) in makedata() 34 data[i][j] = rand(); in makedata() 52 static int test_disks(int i, int j) in test_disks() argument 60 dataptrs[j] = recovj; in test_disks() 62 raid6_dual_recov(NDISKS, PAGE_SIZE, i, j, (void **)&dataptrs); in test_disks() 65 errb = memcmp(data[j], recovj, PAGE_SIZE); in test_disks() 67 if (i < NDISKS-2 && j == NDISKS-1) { in test_disks() 75 j, disk_type(j), in test_disks() 82 dataptrs[j] = data[j]; in test_disks() [all …]
|
| /lib/crypto/ |
| D | gf128mul.c | 283 int i, j, k; in gf128mul_init_64k_bbe() local 299 for (j = 1; j <= 64; j <<= 1) in gf128mul_init_64k_bbe() 300 gf128mul_x_bbe(&t->t[0]->t[j + j], &t->t[0]->t[j]); in gf128mul_init_64k_bbe() 303 for (j = 2; j < 256; j += j) in gf128mul_init_64k_bbe() 304 for (k = 1; k < j; ++k) in gf128mul_init_64k_bbe() 305 be128_xor(&t->t[i]->t[j + k], in gf128mul_init_64k_bbe() 306 &t->t[i]->t[j], &t->t[i]->t[k]); in gf128mul_init_64k_bbe() 311 for (j = 128; j > 0; j >>= 1) { in gf128mul_init_64k_bbe() 312 t->t[i]->t[j] = t->t[i - 1]->t[j]; in gf128mul_init_64k_bbe() 313 gf128mul_x8_bbe(&t->t[i]->t[j]); in gf128mul_init_64k_bbe() [all …]
|
| /lib/crypto/mpi/ |
| D | generic_mpih-add1.c | 25 mpi_size_t j; in mpihelp_add_n() local 29 j = -size; in mpihelp_add_n() 32 s1_ptr -= j; in mpihelp_add_n() 33 s2_ptr -= j; in mpihelp_add_n() 34 res_ptr -= j; in mpihelp_add_n() 38 y = s2_ptr[j]; in mpihelp_add_n() 39 x = s1_ptr[j]; in mpihelp_add_n() 44 res_ptr[j] = y; in mpihelp_add_n() 45 } while (++j); in mpihelp_add_n()
|
| D | generic_mpih-sub1.c | 24 mpi_size_t j; in mpihelp_sub_n() local 28 j = -size; in mpihelp_sub_n() 31 s1_ptr -= j; in mpihelp_sub_n() 32 s2_ptr -= j; in mpihelp_sub_n() 33 res_ptr -= j; in mpihelp_sub_n() 37 y = s2_ptr[j]; in mpihelp_sub_n() 38 x = s1_ptr[j]; in mpihelp_sub_n() 43 res_ptr[j] = y; in mpihelp_sub_n() 44 } while (++j); in mpihelp_sub_n()
|
| D | generic_mpih-mul2.c | 24 mpi_size_t j; in mpihelp_addmul_1() local 30 j = -s1_size; in mpihelp_addmul_1() 31 res_ptr -= j; in mpihelp_addmul_1() 32 s1_ptr -= j; in mpihelp_addmul_1() 36 umul_ppmm(prod_high, prod_low, s1_ptr[j], s2_limb); in mpihelp_addmul_1() 41 x = res_ptr[j]; in mpihelp_addmul_1() 44 res_ptr[j] = prod_low; in mpihelp_addmul_1() 45 } while (++j); in mpihelp_addmul_1()
|
| D | generic_mpih-mul3.c | 24 mpi_size_t j; in mpihelp_submul_1() local 30 j = -s1_size; in mpihelp_submul_1() 31 res_ptr -= j; in mpihelp_submul_1() 32 s1_ptr -= j; in mpihelp_submul_1() 36 umul_ppmm(prod_high, prod_low, s1_ptr[j], s2_limb); in mpihelp_submul_1() 41 x = res_ptr[j]; in mpihelp_submul_1() 44 res_ptr[j] = prod_low; in mpihelp_submul_1() 45 } while (++j); in mpihelp_submul_1()
|
| D | generic_mpih-mul1.c | 24 mpi_size_t j; in mpihelp_mul_1() local 29 j = -s1_size; in mpihelp_mul_1() 32 s1_ptr -= j; in mpihelp_mul_1() 33 res_ptr -= j; in mpihelp_mul_1() 37 umul_ppmm(prod_high, prod_low, s1_ptr[j], s2_limb); in mpihelp_mul_1() 40 res_ptr[j] = prod_low; in mpihelp_mul_1() 41 } while (++j); in mpihelp_mul_1()
|
| /lib/math/ |
| D | test_div64.c | 152 static inline bool test_div64_verify(u64 quotient, u32 remainder, int i, int j) in test_div64_verify() argument 154 return (quotient == test_div64_results[i][j].quotient && in test_div64_verify() 155 remainder == test_div64_results[i][j].remainder); in test_div64_verify() 163 #define test_div64_one(dividend, divisor, i, j) ({ \ argument 170 if (!test_div64_verify(quotient, remainder, i, j)) { \ 174 test_div64_results[i][j].quotient, \ 175 test_div64_results[i][j].remainder); \ 189 int i, j; in test_div64() local 211 for (j = 0; j < SIZE_DIV64_DIVISORS; j++) { in test_div64() 212 if (!test_div64_one(dividend, test_div64_divisors[j], in test_div64() [all …]
|