Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mpute roots of a degree 3 polynomial over GF(2^m)

Proto:static int find_poly_deg3_roots(struct bch_control *bch, struct gf_poly *poly, unsigned int *roots)

Type:int

Parameter:

TypeParameterName
struct bch_control *bch
struct gf_poly *poly
unsigned int *roots
615  n = 0
618  If polynomial terms [0] Then
620  e3 = polynomial terms [3]
621  c2 = gf_div(bch, polynomial terms [0], e3)
622  b2 = gf_div(bch, polynomial terms [1], e3)
623  a2 = gf_div(bch, polynomial terms [2], e3)
626  c = Galois field basic operations: multiply, divide, inverse, etc.
627  b = Galois field basic operations: multiply, divide, inverse, etc. ^ c2
628  a = gf_sqr(bch, a2) ^ b2
633  When i < 4 cycle
634  If tmp[i] != a2 Then roots[n++] = a_ilog(bch, tmp[i])
639  Return n
Caller
NameDescribe
find_poly_rootsd roots of a polynomial, using BTZ algorithm; see the beginning of this* file for details