Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\bch.c Create Date:2022-07-28 06:59:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Given a polynomial f and an integer k, compute Tr(a^kX) mod f* This is used in Berlekamp Trace algorithm for splitting polynomials

Proto:static void compute_trace_bk_mod(struct bch_control *bch, int k, const struct gf_poly *f, struct gf_poly *z, struct gf_poly *out)

Type:void

Parameter:

TypeParameterName
struct bch_control *bch
intk
const struct gf_poly *f
struct gf_poly *z
struct gf_poly *out
809  m = GF_M(bch)
813  polynomial degree = 1
814  polynomial terms [0] = 0
815  polynomial terms [1] = private: [k]
817  polynomial degree = 0
818  memset(out, 0, given its degree, compute a polynomial size in bytes (polynomial degree ))
821  ld monic, log-based representation of a polynomial
823  When i < m cycle
825  When j >= 0 cycle
828  polynomial terms [2 * j + 1] = 0
830  If polynomial degree > polynomial degree Then polynomial degree = polynomial degree
833  If i < m - 1 Then
834  polynomial degree *= 2
839  When Not polynomial terms [polynomial degree ] && polynomial degree cycle
840  polynomial degree --
842  dbg("Tr(a^%d.X) mod f = %s\n", k, gf_poly_str(out))
Caller
NameDescribe
factor_polynomialactor a polynomial using Berlekamp Trace algorithm (BTA)