Lines Matching refs:roots
538 * this function builds and solves a linear system for finding roots of a degree
543 unsigned int *roots)
572 return solve_linear_system(bch, rows, roots, 4);
579 unsigned int *roots)
585 roots[n++] = mod_s(bch, GF_N(bch)-bch->a_log_tab[poly->c[0]]+
591 * compute roots of a degree 2 polynomial over GF(2^m)
594 unsigned int *roots)
611 * i.e. r and r+1 are roots iff Tr(u)=0
623 roots[n++] = modulo(bch, 2*GF_N(bch)-l1-
625 roots[n++] = modulo(bch, 2*GF_N(bch)-l1-
633 * compute roots of a degree 3 polynomial over GF(2^m)
636 unsigned int *roots)
653 /* find the 4 roots of this affine polynomial */
655 /* remove a2 from final list of roots */
658 roots[n++] = a_ilog(bch, tmp[i]);
666 * compute roots of a degree 4 polynomial over GF(2^m)
669 unsigned int *roots)
705 /* assume all roots have multiplicity 1 */
717 /* find the 4 roots of this affine polynomial */
718 if (find_affine4_roots(bch, a2, b2, c2, roots) == 4) {
720 /* post-process roots (reverse transformations) */
721 f = a ? gf_inv(bch, roots[i]) : roots[i];
722 roots[i] = a_ilog(bch, f^e);
904 * find roots of a polynomial, using BTZ algorithm; see the beginning of this
908 struct gf_poly *poly, unsigned int *roots)
916 cnt = find_poly_deg1_roots(bch, poly, roots);
919 cnt = find_poly_deg2_roots(bch, poly, roots);
922 cnt = find_poly_deg3_roots(bch, poly, roots);
925 cnt = find_poly_deg4_roots(bch, poly, roots);
933 cnt += find_poly_roots(bch, k+1, f1, roots);
935 cnt += find_poly_roots(bch, k+1, f2, roots+cnt);
948 struct gf_poly *p, unsigned int *roots)
967 roots[count++] = GF_N(bch)-i;
1204 unsigned int i, j, nbits, r, word, *roots;
1209 roots = bch_alloc((bch->n+1)*sizeof(*roots), &err);
1218 /* enumerate all roots of g(X) */
1219 memset(roots , 0, (bch->n+1)*sizeof(*roots));
1222 roots[r] = 1;
1230 if (roots[i]) {
1258 kfree(roots);