Lines Matching full:rs

108 static struct wspace *alloc_ws(struct rs_codec *rs)  in alloc_ws()  argument
110 int nroots = rs->nroots; in alloc_ws()
112 int nn = rs->nn; in alloc_ws()
151 static int get_rcw_we(struct rs_control *rs, struct wspace *ws, in get_rcw_we() argument
154 int nroots = rs->codec->nroots; in get_rcw_we()
158 int nn = rs->codec->nn; in get_rcw_we()
170 encode_rs16(rs, c, dlen, c + dlen, 0); in get_rcw_we()
232 struct rs_codec *rs = rsc->codec; in compute_syndrome() local
233 uint16_t *alpha_to = rs->alpha_to; in compute_syndrome()
234 uint16_t *index_of = rs->index_of; in compute_syndrome()
235 int nroots = rs->nroots; in compute_syndrome()
236 int prim = rs->prim; in compute_syndrome()
237 int fcr = rs->fcr; in compute_syndrome()
248 alpha_to[rs_modnn(rs, index_of[syn[i]] in compute_syndrome()
256 syn[i] = rs->index_of[syn[i]]; in compute_syndrome()
260 static void test_uc(struct rs_control *rs, int len, int errs, in test_uc() argument
264 int dlen = len - rs->codec->nroots; in test_uc()
275 nerrs = get_rcw_we(rs, ws, len, errs, eras); in test_uc()
279 derrs = decode_rs16(rs, r, r + dlen, dlen, in test_uc()
284 compute_syndrome(rs, r, len, s); in test_uc()
285 derrs = decode_rs16(rs, NULL, NULL, dlen, in test_uc()
290 derrs = decode_rs16(rs, r, r + dlen, dlen, in test_uc()
313 static int ex_rs_helper(struct rs_control *rs, struct wspace *ws, in ex_rs_helper() argument
323 int nroots = rs->codec->nroots; in ex_rs_helper()
331 test_uc(rs, len, errs, eras, trials, &stat, ws, method); in ex_rs_helper()
349 static int exercise_rs(struct rs_control *rs, struct wspace *ws, in exercise_rs() argument
360 retval |= ex_rs_helper(rs, ws, len, trials, i); in exercise_rs()
366 static void test_bc(struct rs_control *rs, int len, int errs, in test_bc() argument
370 int nroots = rs->codec->nroots; in test_bc()
378 get_rcw_we(rs, ws, len, errs, eras); in test_bc()
379 derrs = decode_rs16(rs, r, r + dlen, dlen, in test_bc()
396 encode_rs16(rs, r, dlen, corr, 0); in test_bc()
407 static int exercise_rs_bc(struct rs_control *rs, struct wspace *ws, in exercise_rs_bc() argument
411 int nroots = rs->codec->nroots; in exercise_rs_bc()
424 test_bc(rs, len, errs, eras, trials, &stat, ws); in exercise_rs_bc()