Lines Matching refs:deg

104 	unsigned int deg;    /* polynomial degree */  member
342 static inline int deg(unsigned int poly) in deg() function
425 i = deg(poly); in compute_syndromes()
440 memcpy(dst, src, GF_POLY_SZ(src->deg)); in gf_poly_copy()
457 pelp->deg = 0; in compute_error_locator_polynomial()
459 elp->deg = 0; in compute_error_locator_polynomial()
463 for (i = 0; (i < t) && (elp->deg <= t); i++) { in compute_error_locator_polynomial()
469 for (j = 0; j <= pelp->deg; j++) { in compute_error_locator_polynomial()
476 tmp = pelp->deg+k; in compute_error_locator_polynomial()
477 if (tmp > elp->deg) { in compute_error_locator_polynomial()
478 elp->deg = tmp; in compute_error_locator_polynomial()
487 for (j = 1; j <= elp->deg; j++) in compute_error_locator_polynomial()
492 return (elp->deg > t) ? -1 : (int)elp->deg; in compute_error_locator_polynomial()
650 i = deg(v); in find_poly_deg2_roots()
769 int i, d = a->deg, l = GF_N(bch)-a_log(bch, a->c[a->deg]); in gf_poly_logrep()
784 const unsigned int d = b->deg; in gf_poly_mod()
786 if (a->deg < d) in gf_poly_mod()
795 for (j = a->deg; j >= d; j--) { in gf_poly_mod()
807 a->deg = d-1; in gf_poly_mod()
808 while (!c[a->deg] && a->deg) in gf_poly_mod()
809 a->deg--; in gf_poly_mod()
818 if (a->deg >= b->deg) { in gf_poly_div()
819 q->deg = a->deg-b->deg; in gf_poly_div()
823 memcpy(q->c, &a->c[b->deg], (1+q->deg)*sizeof(unsigned int)); in gf_poly_div()
825 q->deg = 0; in gf_poly_div()
840 if (a->deg < b->deg) { in gf_poly_gcd()
846 while (b->deg > 0) { in gf_poly_gcd()
870 z->deg = 1; in compute_trace_bk_mod()
874 out->deg = 0; in compute_trace_bk_mod()
875 memset(out, 0, GF_POLY_SZ(f->deg)); in compute_trace_bk_mod()
882 for (j = z->deg; j >= 0; j--) { in compute_trace_bk_mod()
887 if (z->deg > out->deg) in compute_trace_bk_mod()
888 out->deg = z->deg; in compute_trace_bk_mod()
891 z->deg *= 2; in compute_trace_bk_mod()
896 while (!out->c[out->deg] && out->deg) in compute_trace_bk_mod()
897 out->deg--; in compute_trace_bk_mod()
922 if (tk->deg > 0) { in factor_polynomial()
926 if (gcd->deg < f->deg) { in factor_polynomial()
930 *h = &((struct gf_poly_deg1 *)f)[gcd->deg].poly; in factor_polynomial()
947 switch (poly->deg) { in find_poly_roots()
964 if (poly->deg && (k <= GF_M(bch))) { in find_poly_roots()
990 bch->cache[p->deg] = 0; in chien_search()
991 syn0 = gf_div(bch, p->c[0], p->c[p->deg]); in chien_search()
995 for (j = 1, syn = syn0; j <= p->deg; j++) { in chien_search()
1002 if (count == p->deg) in chien_search()
1006 return (count == p->deg) ? count : 0; in chien_search()
1123 const unsigned int k = 1 << deg(poly); in build_gf_tables()
1165 d = deg(data); in build_mod8_tables()
1261 g->deg = 0; in compute_generator_polynomial()
1267 g->c[g->deg+1] = 1; in compute_generator_polynomial()
1268 for (j = g->deg; j > 0; j--) in compute_generator_polynomial()
1272 g->deg++; in compute_generator_polynomial()
1276 n = g->deg+1; in compute_generator_polynomial()
1288 bch->ecc_bits = g->deg; in compute_generator_polynomial()