Lines Matching +full:k +full:- +full:to +full:- +full:j
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* -*- linux-c -*- ------------------------------------------------------- *
4 * Copyright 2002-2007 H. Peter Anvin - All Rights Reserved
6 * ----------------------------------------------------------------------- */
11 * Make RAID-6 tables. This is a host user space program to be run at
55 int i, j, k; in main() local
70 for (j = 0; j < 256; j += 8) { in main()
72 for (k = 0; k < 8; k++) in main()
73 printf("0x%02x,%c", gfmul(i, j + k), in main()
74 (k == 7) ? '\n' : ' '); in main()
89 for (j = 0; j < 16; j += 8) { in main()
91 for (k = 0; k < 8; k++) in main()
92 printf("0x%02x,%c", gfmul(i, j + k), in main()
93 (k == 7) ? '\n' : ' '); in main()
95 for (j = 0; j < 16; j += 8) { in main()
97 for (k = 0; k < 8; k++) in main()
98 printf("0x%02x,%c", gfmul(i, (j + k) << 4), in main()
99 (k == 7) ? '\n' : ' '); in main()
108 /* Compute power-of-2 table (exponent) */ in main()
114 for (j = 0; j < 8; j++) { in main()
115 exptbl[i + j] = v; in main()
116 printf("0x%02x,%c", v, (j == 7) ? '\n' : ' '); in main()
127 /* Compute log-of-2 table */ in main()
132 for (j = 0; j < 8; j++) { in main()
134 for (k = 0; k < 256; k++) in main()
135 if (exptbl[k] == (i + j)) { in main()
136 v = k; in main()
139 printf("0x%02x,%c", v, (j == 7) ? '\n' : ' '); in main()
147 /* Compute inverse table x^-1 == x^254 */ in main()
152 for (j = 0; j < 8; j++) { in main()
153 invtbl[i + j] = v = gfpow(i + j, 254); in main()
154 printf("0x%02x,%c", v, (j == 7) ? '\n' : ' '); in main()
162 /* Compute inv(2^x + 1) (exponent-xor-inverse) table */ in main()
167 for (j = 0; j < 8; j++) in main()
168 printf("0x%02x,%c", invtbl[exptbl[i + j] ^ 1], in main()
169 (j == 7) ? '\n' : ' '); in main()