/lib/reed_solomon/ |
D | decode_rs.c | 21 int i, j, r, k, pad; variable 50 for (i = 0; i < nroots; i++) 51 syn[i] = (((uint16_t) data[0]) ^ invmsk) & msk; 54 for (i = 0; i < nroots; i++) { 55 if (syn[i] == 0) { 56 syn[i] = (((uint16_t) data[j]) ^ 59 syn[i] = ((((uint16_t) data[j]) ^ 61 alpha_to[rs_modnn(rs, index_of[syn[i]] + 62 (fcr + i) * prim)]; 68 for (i = 0; i < nroots; i++) { [all …]
|
/lib/ |
D | build_OID_registry | 55 for (my $i = 0; $i <= $#names; $i++) { 56 my $name = $names[$i]; 57 my $oid = $oids[$i]; 85 for (my $i = 0; $i <= $#names; $i++) { 86 print C_FILE "\t[OID_", $names[$i], "] = ", $indices[$i], ",\n" 96 for (my $i = 0; $i <= $#names; $i++) { 99 my @components = split(/[.]/, $oids[$i]); 123 for (my $i = 0; $i <= $#names; $i++) { 124 my @octets = @{$encoded_oids[$i]}; 141 for (my $i = 0; $i <= $#names; $i++) { [all …]
|
D | decompress_bunzip2.c | 161 i, j, k, t, runPos, symCount, symTotal, nSelectors, *byteCount; in get_next_block() local 174 i = get_bits(bd, 24); in get_next_block() 177 if ((i == 0x177245) && (j == 0x385090)) in get_next_block() 179 if ((i != 0x314159) || (j != 0x265359)) in get_next_block() 196 for (i = 0; i < 16; i++) { in get_next_block() 197 if (t&(1 << (15-i))) { in get_next_block() 201 symToByte[symTotal++] = (16*i)+j; in get_next_block() 216 for (i = 0; i < groupCount; i++) in get_next_block() 217 mtfSymbol[i] = i; in get_next_block() 218 for (i = 0; i < nSelectors; i++) { in get_next_block() [all …]
|
D | ts_bm.c | 65 unsigned int i, text_len, consumed = state->offset; in bm_find() local 79 for (i = 0; i < bm->patlen; i++) in bm_find() 80 if ((icase ? toupper(text[shift-i]) in bm_find() 81 : text[shift-i]) in bm_find() 82 != bm->pattern[bm->patlen-1-i]) in bm_find() 89 next: bs = bm->bad_shift[text[shift-i]]; in bm_find() 92 shift = max_t(int, shift-i+bs, shift+bm->good_shift[i]); in bm_find() 100 static int subpattern(u8 *pattern, int i, int j, int g) in subpattern() argument 102 int x = i+g-1, y = j+g-1, ret = 0; in subpattern() 110 ret = pattern[i-1] != pattern[j-1]; in subpattern() [all …]
|
D | btree.c | 105 size_t i; in longcmp() local 107 for (i = 0; i < n; i++) { in longcmp() 108 if (l1[i] < l2[i]) in longcmp() 110 if (l1[i] > l2[i]) in longcmp() 119 size_t i; in longcpy() local 121 for (i = 0; i < n; i++) in longcpy() 122 dest[i] = src[i]; in longcpy() 128 size_t i; in longset() local 130 for (i = 0; i < n; i++) in longset() 131 s[i] = c; in longset() [all …]
|
D | gen_crc32table.c | 38 unsigned i, j; in crc32init_le_generic() local 43 for (i = LE_TABLE_SIZE >> 1; i; i >>= 1) { in crc32init_le_generic() 45 for (j = 0; j < LE_TABLE_SIZE; j += 2 * i) in crc32init_le_generic() 46 tab[0][i + j] = crc ^ tab[0][j]; in crc32init_le_generic() 48 for (i = 0; i < LE_TABLE_SIZE; i++) { in crc32init_le_generic() 49 crc = tab[0][i]; in crc32init_le_generic() 52 tab[j][i] = crc; in crc32init_le_generic() 72 unsigned i, j; in crc32init_be() local 77 for (i = 1; i < BE_TABLE_SIZE; i <<= 1) { in crc32init_be() 79 for (j = 0; j < i; j++) in crc32init_be() [all …]
|
D | sort.c | 52 int i = (num/2 - 1) * size, n = num * size, c, r; in sort() local 58 for ( ; i >= 0; i -= size) { in sort() 59 for (r = i; r * 2 + size < n; r = c) { in sort() 71 for (i = n - size; i > 0; i -= size) { in sort() 72 swap_func(base, base + i, size); in sort() 73 for (r = 0; r * 2 + size < i; r = c) { in sort() 75 if (c < i - size && in sort() 97 int *a, i, r = 1; 104 for (i = 0; i < 1000; i++) { 106 a[i] = r; [all …]
|
D | crc32.c | 74 size_t i; local 100 for (i = 0; i < len; i++) { 118 for (i = 0; i < len; i++) 145 int i; local 148 for (i = 0; i < 8; i++) 215 int i; local 218 for (i = 0; i < 8; i++) 999 int i; local 1011 for (i = 0; i < 100; i++) { 1012 bytes += 2*test[i].length; [all …]
|
D | interval_tree_test_main.c | 31 int i; in init() local 32 for (i = 0; i < NODES; i++) { in init() 36 nodes[i].start = a; in init() 37 nodes[i].last = b; in init() 39 nodes[i].start = b; in init() 40 nodes[i].last = a; in init() 43 for (i = 0; i < SEARCHES; i++) in init() 44 queries[i] = prandom_u32_state(&rnd); in init() 49 int i, j; in interval_tree_test_init() local 60 for (i = 0; i < PERF_LOOPS; i++) { in interval_tree_test_init() [all …]
|
D | inflate.c | 340 register unsigned i; /* counter, current code */ in huft_build() local 374 p = b; i = n; in huft_build() 376 Tracecv(*p, (stderr, (n-i >= ' ' && n-i <= '~' ? "%c %d\n" : "0x%x %d\n"), in huft_build() 377 n-i, *p)); in huft_build() 380 } while (--i); in huft_build() 399 for (i = BMAX; i; i--) in huft_build() 400 if (c[i]) in huft_build() 402 g = i; /* maximum code length */ in huft_build() 403 if ((unsigned)l > i) in huft_build() 404 l = i; in huft_build() [all …]
|
D | bch.c | 118 int i; in encode_bch_unaligned() local 125 for (i = 0; i < l; i++) in encode_bch_unaligned() 126 ecc[i] = ((ecc[i] << 8)|(ecc[i+1] >> 24))^(*p++); in encode_bch_unaligned() 139 unsigned int i, nwords = BCH_ECC_WORDS(bch)-1; in load_ecc8() local 141 for (i = 0; i < nwords; i++, src += 4) in load_ecc8() 142 dst[i] = (src[0] << 24)|(src[1] << 16)|(src[2] << 8)|src[3]; in load_ecc8() 155 unsigned int i, nwords = BCH_ECC_WORDS(bch)-1; in store_ecc8() local 157 for (i = 0; i < nwords; i++) { in store_ecc8() 158 *dst++ = (src[i] >> 24); in store_ecc8() 159 *dst++ = (src[i] >> 16) & 0xff; in store_ecc8() [all …]
|
D | random32.c | 93 int i; in prandom_bytes_state() local 95 for (i = 0; i < round_down(bytes, sizeof(u32)); i += sizeof(u32)) { in prandom_bytes_state() 100 p[i + j] = random; in prandom_bytes_state() 104 if (i < bytes) { in prandom_bytes_state() 107 for (; i < bytes; i++) { in prandom_bytes_state() 108 p[i] = random; in prandom_bytes_state() 137 int i; in prandom_seed() local 142 for_each_possible_cpu (i) { in prandom_seed() 143 struct rnd_state *state = &per_cpu(net_rand_state, i); in prandom_seed() 155 int i; in prandom_init() local [all …]
|
D | crc8.c | 31 int i, j; in crc8_populate_msb() local 37 for (i = 1; i < CRC8_TABLE_SIZE; i *= 2) { in crc8_populate_msb() 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 58 for (i = (CRC8_TABLE_SIZE >> 1); i; i >>= 1) { in crc8_populate_lsb() 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 | devres.c | 246 int i; in pcim_iomap_release() local 248 for (i = 0; i < PCIM_IOMAP_MAX; i++) in pcim_iomap_release() 249 if (this->table[i]) in pcim_iomap_release() 250 pci_iounmap(dev, this->table[i]); in pcim_iomap_release() 316 int i; in pcim_iounmap() local 323 for (i = 0; i < PCIM_IOMAP_MAX; i++) in pcim_iounmap() 324 if (tbl[i] == addr) { in pcim_iounmap() 325 tbl[i] = NULL; in pcim_iounmap() 343 int i, rc; in pcim_iomap_regions() local 349 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { in pcim_iomap_regions() [all …]
|
D | test-string_helpers.c | 47 int i, p = 0, q_test = 0, q_real = sizeof(out_real); in test_string_unescape() local 49 for (i = 0; i < ARRAY_SIZE(strings); i++) { in test_string_unescape() 50 const char *s = strings[i].in; in test_string_unescape() 51 int len = strlen(strings[i].in); in test_string_unescape() 58 if (flags & strings[i].flags) { in test_string_unescape() 59 s = strings[i].out; in test_string_unescape() 60 len = strlen(strings[i].out); in test_string_unescape() 93 unsigned int i; in test_string_helpers_init() local 96 for (i = 0; i < UNESCAPE_ANY + 1; i++) in test_string_helpers_init() 97 test_string_unescape(i, false); in test_string_helpers_init()
|
D | lru_cache.c | 54 unsigned i = e_->lc_index; \ 55 BUG_ON(i >= lc_->nr_elements); \ 56 BUG_ON(lc_->lc_element[i] != e_); } while (0) 108 unsigned i; in lc_create() local 145 for (i = 0; i < e_count; i++) { in lc_create() 151 e->lc_index = i; in lc_create() 155 element[i] = e; in lc_create() 157 if (i == e_count) in lc_create() 161 for (i--; i; i--) { in lc_create() 162 void *p = element[i]; in lc_create() [all …]
|
D | ts_kmp.c | 49 unsigned int i, q = 0, text_len, consumed = state->offset; in kmp_find() local 59 for (i = 0; i < text_len; i++) { in kmp_find() 61 != (icase ? toupper(text[i]) : text[i])) in kmp_find() 64 == (icase ? toupper(text[i]) : text[i])) in kmp_find() 67 state->offset = consumed + i + 1; in kmp_find() 100 int i; in kmp_init() local 114 for (i = 0; i < len; i++) in kmp_init() 115 kmp->pattern[i] = toupper(((u8 *)pattern)[i]); in kmp_init()
|
/lib/raid6/ |
D | mktables.c | 58 int i, j, k; in main() local 69 for (i = 0; i < 256; i++) { in main() 74 printf("0x%02x,%c", gfmul(i, j + k), in main() 88 for (i = 0; i < 256; i++) { in main() 93 printf("0x%02x,%c", gfmul(i, j + k), in main() 99 printf("0x%02x,%c", gfmul(i, (j + k) << 4), in main() 113 for (i = 0; i < 256; i += 8) { in main() 116 exptbl[i + j] = v; in main() 131 for (i = 0; i < 256; i += 8) { in main() 134 invtbl[i + j] = v = gfpow(i + j, 254); in main() [all …]
|
/lib/xz/ |
D | xz_dec_bcj.c | 95 size_t i; in bcj_x86() local 107 for (i = 0; i < size; ++i) { in bcj_x86() 108 if ((buf[i] & 0xFE) != 0xE8) in bcj_x86() 111 prev_pos = i - prev_pos; in bcj_x86() 117 b = buf[i + 4 - mask_to_bit_num[prev_mask]]; in bcj_x86() 120 prev_pos = i; in bcj_x86() 127 prev_pos = i; in bcj_x86() 129 if (bcj_x86_test_msbyte(buf[i + 4])) { in bcj_x86() 130 src = get_unaligned_le32(buf + i + 1); in bcj_x86() 132 dest = src - (s->pos + (uint32_t)i + 5); in bcj_x86() [all …]
|
/lib/raid6/test/ |
D | test.c | 33 int i, j; in makedata() local 35 for (i = 0; i < NDISKS; i++) { in makedata() 37 data[i][j] = rand(); in makedata() 39 dataptrs[i] = data[i]; in makedata() 55 static int test_disks(int i, int j) in test_disks() argument 62 dataptrs[i] = recovi; in test_disks() 65 raid6_dual_recov(NDISKS, PAGE_SIZE, i, j, (void **)&dataptrs); in test_disks() 67 erra = memcmp(data[i], recovi, PAGE_SIZE); in test_disks() 70 if (i < NDISKS-2 && j == NDISKS-1) { in test_disks() 77 i, disk_type(i), in test_disks() [all …]
|
/lib/mpi/ |
D | mpih-div.c | 75 mpi_size_t i; in mpihelp_divrem() local 88 for (i = nsize - 2; i >= 0; i--) in mpihelp_divrem() 89 udiv_qrnnd(qp[i], n1, n1, np[i], d); in mpihelp_divrem() 92 for (i = qextra_limbs - 1; i >= 0; i--) in mpihelp_divrem() 93 udiv_qrnnd(qp[i], n1, n1, 0, d); in mpihelp_divrem() 101 mpi_size_t i; in mpihelp_divrem() local 116 for (i = qextra_limbs + nsize - 2 - 1; i >= 0; i--) { in mpihelp_divrem() 120 if (i >= qextra_limbs) in mpihelp_divrem() 135 qp[i] = q; in mpihelp_divrem() 156 qp[i] = q; in mpihelp_divrem() [all …]
|
D | mpicoder.c | 35 int i, j; in mpi_read_raw_data() local 64 i = BYTES_PER_MPI_LIMB - nbytes % BYTES_PER_MPI_LIMB; in mpi_read_raw_data() 65 i %= BYTES_PER_MPI_LIMB; in mpi_read_raw_data() 68 for (; i < BYTES_PER_MPI_LIMB; i++) { in mpi_read_raw_data() 72 i = 0; in mpi_read_raw_data() 83 int i, j; in mpi_read_from_buffer() local 104 i = BYTES_PER_MPI_LIMB - nbytes % BYTES_PER_MPI_LIMB; in mpi_read_from_buffer() 105 i %= BYTES_PER_MPI_LIMB; in mpi_read_from_buffer() 111 for (; i < BYTES_PER_MPI_LIMB; i++) { in mpi_read_from_buffer() 121 i = 0; in mpi_read_from_buffer() [all …]
|
D | mpi-inline.h | 57 mpi_size_t i; /* copy the rest */ in mpihelp_add_1() local 58 for (i = 0; i < s1_size - 1; i++) in mpihelp_add_1() 59 res_ptr[i] = s1_ptr[i]; in mpihelp_add_1() 100 mpi_size_t i; in mpihelp_sub_1() local 101 for (i = 0; i < s1_size - 1; i++) in mpihelp_sub_1() 102 res_ptr[i] = s1_ptr[i]; in mpihelp_sub_1()
|
D | generic_mpih-lshift.c | 45 mpi_size_t i; in mpihelp_lshift() local 51 i = usize - 1; in mpihelp_lshift() 52 low_limb = up[i]; in mpihelp_lshift() 55 while (--i >= 0) { in mpihelp_lshift() 56 low_limb = up[i]; in mpihelp_lshift() 57 wp[i] = (high_limb << sh_1) | (low_limb >> sh_2); in mpihelp_lshift() 60 wp[i] = high_limb << sh_1; in mpihelp_lshift()
|
D | generic_mpih-rshift.c | 46 mpi_size_t i; in mpihelp_rshift() local 55 for (i = 1; i < usize; i++) { in mpihelp_rshift() 56 high_limb = up[i]; in mpihelp_rshift() 57 wp[i] = (low_limb >> sh_1) | (high_limb << sh_2); in mpihelp_rshift() 60 wp[i] = low_limb >> sh_1; in mpihelp_rshift()
|