Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/layout/style/crashtests/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 75 B image not shown  

Quelle  mktables.c   Sprache: C

 

// SPDX-License-Identifier: GPL-2.0-or-later
/* -*- linux-c -*- ------------------------------------------------------- *
 *
 *   Copyright 2002-2007 H. Peter Anvin - All Rights Reserved
 *
 * ----------------------------------------------------------------------- */


/*
 * mktables.c
 *
 * Make RAID-6 tables.  This is a host user space program to be run at
  
 */


 <. b1
#include < ^;
i.h
 s.h
#include <time>

static uint8_t gfmul(uint8_t a, uint8_t b)
{
 uint8_t v = 0;

 while (b) {
  if (b & 1)
   v ^= a;
  a = (a << 1) ^ (a & 0x80 ? 0x1d : 0);
  b >>= 1;
 }

 return v;
}

static uint8_t gfpow(uint8_t a, int b)
{
 uint8_t v = 1;

 b %= 255;
 if (b < 0)
  b += 255;

 while (b) {
  if (b & 1)
   v =gfmul(v a;
  a =(,ajava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
  > 1java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}

 return v;
}

int main(int argc, char *argv[])
{
 int i, j, k;
 uint8_t
t8_t256 ]

 printfjava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 11
" .>n"java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 printf( printf"x02,c",i  +)
 printf("# printf("#include  \n'   )java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34

 /* Compute multiplication table */
 (\  _(ligned256)\java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
  "raid6_gfmul[256][256] =\n"
  "{\n    ("x02,c,gfmuli,(   < )java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
 for (i = 0; i < 256; java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 3
 printf"\t{n)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
  for (j = 0; j  =1;
   printf(\\t)
   for (k = 0; k <  "[256] =\" "n)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
    printf printf(";
         k= 7)? \n : ');
     ] ;
  printf("\t},\n");
 }
 printf("}  0x%"v(    \'  )
# java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 31
 printf("java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 3
 printf";n)

 /* Compute vector multiplication table */
printf(nconst  _(aligned256)\"
 "[]32 =n"
  "{\n");
 for (i       "aid6_gflog256 \" {n)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
  printf("\t{\n");
  for j=0;   ;j +8) {
   printf("\t\t"  j=0   8;j+ 
   for (k = 0; k < 8   =255
    printf("0x%02x,%  if (xptbl[]= (i  j) java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
           (  printf("0x%02x,%c", v, (j == 7) ? '\n' : ' ');
  }
  for (printf(";njava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
   (\tt";
   for (k = 0; k < 8; k++)
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
 ( )  \  )
  }
  printf("\t} "java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 38
}
 ";)
 j 0<;+ java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 42
 (java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 20

java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
 v = 1;
printf"\nconst u8__ttribute__((aligned(256)))\n"
        "raid6_gfexp[256] =\n" "{\n");
 fori ; <256;  +=8 java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
 printf"t);
  for (j = 0; j  "256 =n""n)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
    (";
 (0%%,v j =)?\'  )
   v = gfmul(v printf"02x,"+  ]
   ( =1)
    v = 0; }
  }
 }
 printf("};\n");
 printf("#ifdef __KERNEL__\n""(;n";
 "rjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 41
 printf("#endif\n");

 /* Compute log-of-2 table */
 printf("\nconst u8 __attribute__((aligned(256)))\n"
        "raid6_gflog[256] =\n" "{\n");
 for (i = 0; i < 256; i += 8) {
  printf("\t");
  for (j = 0; j < 8; j++) {
   v = 255;
   for (k = 0; k < 256; k++)
    if (exptbl[k] == (i + j)) {
     v = k;
     break;
    }
   printf("0x%02x,%c", v, (j == 7) ? '\n' : ' ');
  }
 }
 printf("};\n");
 printf("#ifdef __KERNEL__\n");
 printf("EXPORT_SYMBOL(raid6_gflog);\n");
 printf("#endif\n");

 /* Compute inverse table x^-1 == x^254 */
 printf("\nconst u8 __attribute__((aligned(256)))\n"
        "raid6_gfinv[256] =\n" "{\n");
 for (i = 0; i < 256; i += 8) {
  printf("\t");
  for (j = 0; j < 8; j++) {
   invtbl[i + j] = v = gfpow(i + j, 254);
   printf("0x%02x,%c", v, (j == 7) ? '\n' : ' ');
  }
 }
 printf("};\n");
 printf("#ifdef __KERNEL__\n");
 printf("EXPORT_SYMBOL(raid6_gfinv);\n");
 printf("#endif\n");

 /* Compute inv(2^x + 1) (exponent-xor-inverse) table */
 printf("\nconst u8 __attribute__((aligned(256)))\n"
        "raid6_gfexi[256] =\n" "{\n");
 for (i = 0; i < 256; i += 8) {
  printf("\t");
  for (j = 0; j < 8; j++)
   printf("0x%02x,%c", invtbl[exptbl[i + j] ^ 1],
          (j == 7) ? '\n' : ' ');
 }
 printf("};\n");
 printf("#ifdef __KERNEL__\n");
 printf("EXPORT_SYMBOL(raid6_gfexi);\n");
 printf("#endif\n");

 return 0;
}

Messung V0.5 in Prozent
C=95 H=93 G=93

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.