3void __M4RI_TEMPLATE_NAME(_mzd_process_rows_ple)(
mzd_t *M,
rci_t startrow,
rci_t stoprow,
4 rci_t startcol,
int const k[N],
6 assert(1 <= N && N <= 8);
22 sh[7] = k[0] + k[1] + k[2] + k[3] + k[4] + k[5] + k[6];
28 sh[6] = k[0] + k[1] + k[2] + k[3] + k[4] + k[5];
34 sh[5] = k[0] + k[1] + k[2] + k[3] + k[4];
40 sh[4] = k[0] + k[1] + k[2] + k[3];
46 sh[3] = k[0] + k[1] + k[2];
68 wi_t const wide = M->width - block;
70 for (
rci_t r = startrow; r < stoprow; ++r) {
76 x[N - 8] = E[N - 8][(bits >> sh[N - 8]) & bm[N - 8]];
77 bits ^= B[N - 8][x[N - 8]];
78 t[N - 8] = mzd_row_const(T[N - 8], x[N - 8]) + block;
80 x[N - 7] = E[N - 7][(bits >> sh[N - 7]) & bm[N - 7]];
81 bits ^= B[N - 7][x[N - 7]];
82 t[N - 7] = mzd_row_const(T[N - 7], x[N - 7]) + block;
84 x[N - 6] = E[N - 6][(bits >> sh[N - 6]) & bm[N - 6]];
85 bits ^= B[N - 6][x[N - 6]];
86 t[N - 6] = mzd_row_const(T[N - 6], x[N - 6]) + block;
88 x[N - 5] = E[N - 5][(bits >> sh[N - 5]) & bm[N - 5]];
89 bits ^= B[N - 5][x[N - 5]];
90 t[N - 5] = mzd_row_const(T[N - 5], x[N - 5]) + block;
92 x[N - 4] = E[N - 4][(bits >> sh[N - 4]) & bm[N - 4]];
93 bits ^= B[N - 4][x[N - 4]];
94 t[N - 4] = mzd_row_const(T[N - 4], x[N - 4]) + block;
96 x[N - 3] = E[N - 3][(bits >> sh[N - 3]) & bm[N - 3]];
97 bits ^= B[N - 3][x[N - 3]];
98 t[N - 3] = mzd_row_const(T[N - 3], x[N - 3]) + block;
100 x[N - 2] = E[N - 2][(bits >> sh[N - 2]) & bm[N - 2]];
101 bits ^= B[N - 2][x[N - 2]];
102 t[N - 2] = mzd_row_const(T[N - 2], x[N - 2]) + block;
104 x[N - 1] = E[N - 1][(bits >> sh[N - 1]) & bm[N - 1]];
105 bits ^= B[N - 1][x[N - 1]];
106 t[N - 1] = mzd_row_const(T[N - 1], x[N - 1]) + block;
109 __M4RI_TEMPLATE_NAME(_mzd_combine)(m, t, wide);
115void __M4RI_TEMPLATE_NAME(_mzd_ple_a11)(
mzd_t *A,
rci_t const start_row,
rci_t const stop_row,
116 rci_t const start_col,
wi_t const block,
int const k[N],
119 wi_t const wide = A->width - block;
121 if (wide <= 0)
return;
135 sh[7] = k[0] + k[1] + k[2] + k[3] + k[4] + k[5] + k[6];
140 sh[6] = k[0] + k[1] + k[2] + k[3] + k[4] + k[5];
145 sh[5] = k[0] + k[1] + k[2] + k[3] + k[4];
150 sh[4] = k[0] + k[1] + k[2] + k[3];
155 sh[3] = k[0] + k[1] + k[2];
173 const rci_t bits_to_read = sh[N - 1] + k[N - 1];
175 for (
rci_t i = start_row; i < stop_row; ++i) {
181 x[N - 8] = M[N - 8][(bits >> sh[N - 8]) & bm[N - 8]];
182 t[N - 8] = mzd_row_const(T[N - 8], x[N - 8]) + block;
184 x[N - 7] = M[N - 7][(bits >> sh[N - 7]) & bm[N - 7]];
185 t[N - 7] = mzd_row_const(T[N - 7], x[N - 7]) + block;
187 x[N - 6] = M[N - 6][(bits >> sh[N - 6]) & bm[N - 6]];
188 t[N - 6] = mzd_row_const(T[N - 6], x[N - 6]) + block;
190 x[N - 5] = M[N - 5][(bits >> sh[N - 5]) & bm[N - 5]];
191 t[N - 5] = mzd_row_const(T[N - 5], x[N - 5]) + block;
193 x[N - 4] = M[N - 4][(bits >> sh[N - 4]) & bm[N - 4]];
194 t[N - 4] = mzd_row_const(T[N - 4], x[N - 4]) + block;
196 x[N - 3] = M[N - 3][(bits >> sh[N - 3]) & bm[N - 3]];
197 t[N - 3] = mzd_row_const(T[N - 3], x[N - 3]) + block;
199 x[N - 2] = M[N - 2][(bits >> sh[N - 2]) & bm[N - 2]];
200 t[N - 2] = mzd_row_const(T[N - 2], x[N - 2]) + block;
202 x[N - 1] = M[N - 1][(bits >> sh[N - 1]) & bm[N - 1]];
203 t[N - 1] = mzd_row_const(T[N - 1], x[N - 1]) + block;
205 __M4RI_TEMPLATE_NAME(_mzd_combine)(m, t, wide);
int rci_t
Type of row and column indexes.
Definition misc.h:72
int64_t wi_t
Type of word indexes.
Definition misc.h:81
uint64_t word
A word is the typical packed data structure to represent packed bits.
Definition misc.h:87
static int const m4ri_radix
The number of bits in a word.
Definition misc.h:141
#define __M4RI_LEFT_BITMASK(n)
create a bit mask to zero out all but the (n - 1) % m4ri_radix + 1 leftmost bits.
Definition misc.h:272
static word * mzd_row(mzd_t *M, rci_t row)
Get pointer to first word of row.
Definition mzd.h:185
static word mzd_read_bits(mzd_t const *M, rci_t const x, rci_t const y, int const n)
Definition mzd.h:892
Dense matrices over GF(2).
Definition mzd.h:68
PLE Elimination Tables.
Definition ple_russian.h:39