Lines Matching refs:roots
572 * this function builds and solves a linear system for finding roots of a degree
577 unsigned int *roots)
606 return solve_linear_system(bch, rows, roots, 4);
613 unsigned int *roots)
619 roots[n++] = mod_s(bch, GF_N(bch)-bch->a_log_tab[poly->c[0]]+
625 * compute roots of a degree 2 polynomial over GF(2^m)
628 unsigned int *roots)
645 * i.e. r and r+1 are roots iff Tr(u)=0
657 roots[n++] = modulo(bch, 2*GF_N(bch)-l1-
659 roots[n++] = modulo(bch, 2*GF_N(bch)-l1-
667 * compute roots of a degree 3 polynomial over GF(2^m)
670 unsigned int *roots)
687 /* find the 4 roots of this affine polynomial */
689 /* remove a2 from final list of roots */
692 roots[n++] = a_ilog(bch, tmp[i]);
700 * compute roots of a degree 4 polynomial over GF(2^m)
703 unsigned int *roots)
739 /* assume all roots have multiplicity 1 */
751 /* find the 4 roots of this affine polynomial */
752 if (find_affine4_roots(bch, a2, b2, c2, roots) == 4) {
754 /* post-process roots (reverse transformations) */
755 f = a ? gf_inv(bch, roots[i]) : roots[i];
756 roots[i] = a_ilog(bch, f^e);
938 * find roots of a polynomial, using BTZ algorithm; see the beginning of this
942 struct gf_poly *poly, unsigned int *roots)
950 cnt = find_poly_deg1_roots(bch, poly, roots);
953 cnt = find_poly_deg2_roots(bch, poly, roots);
956 cnt = find_poly_deg3_roots(bch, poly, roots);
959 cnt = find_poly_deg4_roots(bch, poly, roots);
967 cnt += find_poly_roots(bch, k+1, f1, roots);
969 cnt += find_poly_roots(bch, k+1, f2, roots+cnt);
982 struct gf_poly *p, unsigned int *roots)
1001 roots[count++] = GF_N(bch)-i;
1238 unsigned int i, j, nbits, r, word, *roots;
1243 roots = bch_alloc((bch->n+1)*sizeof(*roots), &err);
1252 /* enumerate all roots of g(X) */
1253 memset(roots , 0, (bch->n+1)*sizeof(*roots));
1256 roots[r] = 1;
1264 if (roots[i]) {
1292 kfree(roots);