Lines Matching refs:c
106 unsigned int c[]; /* polynomial terms */ member
115 unsigned int c[2]; member
424 pelp->c[0] = 1; in compute_error_locator_polynomial()
426 elp->c[0] = 1; 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()
454 d ^= gf_mul(bch, elp->c[j], syn[2*i+2-j]); in compute_error_locator_polynomial()
470 int rem, c, r, p, k, param[BCH_MAX_M]; in solve_linear_system() local
476 for (c = 0; c < m; c++) { in solve_linear_system()
478 p = c-k; in solve_linear_system()
497 param[k++] = c; in solve_linear_system()
520 for (c = 0; c < k; c++) in solve_linear_system()
521 rows[param[c]] = (rows[param[c]] & ~1)|((p >> c) & 1); in solve_linear_system()
539 unsigned int b, unsigned int c, in find_affine4_roots() argument
548 rows[0] = c; in find_affine4_roots()
580 if (poly->c[0]) in find_poly_deg1_roots()
582 roots[n++] = mod_s(bch, GF_N(bch)-bch->a_log_tab[poly->c[0]]+ in find_poly_deg1_roots()
583 bch->a_log_tab[poly->c[1]]); in find_poly_deg1_roots()
596 if (poly->c[0] && poly->c[1]) { in find_poly_deg2_roots()
598 l0 = bch->a_log_tab[poly->c[0]]; in find_poly_deg2_roots()
599 l1 = bch->a_log_tab[poly->c[1]]; in find_poly_deg2_roots()
600 l2 = bch->a_log_tab[poly->c[2]]; in find_poly_deg2_roots()
636 unsigned int a, b, c, a2, b2, c2, e3, tmp[4]; in find_poly_deg3_roots() local
638 if (poly->c[0]) { in find_poly_deg3_roots()
640 e3 = poly->c[3]; in find_poly_deg3_roots()
641 c2 = gf_div(bch, poly->c[0], e3); in find_poly_deg3_roots()
642 b2 = gf_div(bch, poly->c[1], e3); in find_poly_deg3_roots()
643 a2 = gf_div(bch, poly->c[2], e3); in find_poly_deg3_roots()
646 c = gf_mul(bch, a2, c2); /* c = a2c2 */ in find_poly_deg3_roots()
651 if (find_affine4_roots(bch, a, b, c, tmp) == 4) { in find_poly_deg3_roots()
669 unsigned int a, b, c, d, e = 0, f, a2, b2, c2, e4; in find_poly_deg4_roots() local
671 if (poly->c[0] == 0) in find_poly_deg4_roots()
675 e4 = poly->c[4]; in find_poly_deg4_roots()
676 d = gf_div(bch, poly->c[0], e4); in find_poly_deg4_roots()
677 c = gf_div(bch, poly->c[1], e4); in find_poly_deg4_roots()
678 b = gf_div(bch, poly->c[2], e4); in find_poly_deg4_roots()
679 a = gf_div(bch, poly->c[3], e4); in find_poly_deg4_roots()
684 if (c) { in find_poly_deg4_roots()
686 f = gf_div(bch, c, a); in find_poly_deg4_roots()
711 b2 = c; in find_poly_deg4_roots()
732 int i, d = a->deg, l = GF_N(bch)-a_log(bch, a->c[a->deg]); in gf_poly_logrep()
736 rep[i] = a->c[i] ? mod_s(bch, a_log(bch, a->c[i])+l) : -1; in gf_poly_logrep()
746 unsigned int i, j, *c = a->c; in gf_poly_mod() local
759 if (c[j]) { in gf_poly_mod()
760 la = a_log(bch, c[j]); in gf_poly_mod()
765 c[p] ^= bch->a_pow_tab[mod_s(bch, in gf_poly_mod()
771 while (!c[a->deg] && a->deg) in gf_poly_mod()
786 memcpy(q->c, &a->c[b->deg], (1+q->deg)*sizeof(unsigned int)); in gf_poly_div()
789 q->c[0] = 0; in gf_poly_div()
827 z->c[0] = 0; in compute_trace_bk_mod()
828 z->c[1] = bch->a_pow_tab[k]; in compute_trace_bk_mod()
839 out->c[j] ^= z->c[j]; in compute_trace_bk_mod()
840 z->c[2*j] = gf_sqr(bch, z->c[j]); in compute_trace_bk_mod()
841 z->c[2*j+1] = 0; in compute_trace_bk_mod()
852 while (!out->c[out->deg] && out->deg) in compute_trace_bk_mod()
947 syn0 = gf_div(bch, p->c[0], p->c[p->deg]); in chien_search()
1218 g->c[0] = 1; in compute_generator_polynomial()
1223 g->c[g->deg+1] = 1; in compute_generator_polynomial()
1225 g->c[j] = gf_mul(bch, g->c[j], r)^g->c[j-1]; in compute_generator_polynomial()
1227 g->c[0] = gf_mul(bch, g->c[0], r); in compute_generator_polynomial()
1238 if (g->c[n-1-j]) in compute_generator_polynomial()