/* ** cleanbench.h ** Header for cleanbench.c ** BYTEmark (tm) ** BYTE's Native Mode Benchmarks ** Rick Grehan, BYTE Magazine ** ** Creation: ** Revision: 3/95;10/95 ** 10/95 - Added memory array & alignment -- RG ** ** DISCLAIMER ** The source, executable, and documentation files that comprise ** the BYTEmark benchmarks are made available on an "as is" basis. ** This means that we at BYTE Magazine have made every reasonable ** effort to verify that the there are no errors in the source and ** executable code. We cannot, however, guarantee that the programs ** are error-free. Consequently, McGraw-HIll and BYTE Magazine make ** no claims in regard to the fitness of the source code, executable ** code, and documentation of the BYTEmark. ** Furthermore, BYTE Magazine, McGraw-Hill, and all employees ** of McGraw-Hill cannot be held responsible for any damages resulting ** from the use of this code or the results obtained from using ** this code. */ /* ** Following should be modified accordingly per each ** compilation. */ char *sysname="You can enter your system description in cleanbench.h"; char *compilername="It then will be printed here after you recompile"; char *compilerversion="Have a nice day"; /* Tests-to-do flags...must coincide with test. */ enum { NUMSORT, STRINGSORT, BITFIELD, FPEMULATION, FOURIER, ASSIGNMENT, IDEA, HUFFMAN, NEURAL, LINEAR } tests_t; #define NUMTESTS 10 /* ** Following array is a collection of flags indicating which ** tests to perform. */ int tests_to_do[NUMTESTS]; /* ** Test names */ char *ftestnames[] = { "NUMERIC SORT ", "STRING SORT ", "BITFIELD ", "FP EMULATION ", "FOURIER ", "ASSIGNMENT ", "IDEA ", "HUFFMAN ", "NEURAL NET ", "LU DECOMPOSITION" }; /* ** Indexes -- Baseline is DELL Pentium XP90 ** 11/28/94 */ double bindex[] = { 38.993, /* Numeric sort */ 2.238, /* String sort */ 5829704, /* Bitfield */ 2.084, /* FP Emulation */ 879.278, /* Fourier */ .2628, /* Assignment */ 65.382, /* IDEA */ 36.062, /* Huffman */ .6225, /* Neural Net */ 19.3031 }; /* LU Decomposition */ /* ** Indices -- Baseline is a AMD K6-233, 32MB RAM (60ns SDRAM),512k L2 cache, ** Linux kernel 2.0.32, libc-5.4.38, gcc-2.7.2.3) ** Nov/30/97 */ double lx_bindex[] = { 118.73, /* Numeric sort */ 14.459, /* String sort */ 27910000, /* Bitfield */ 9.0314, /* FP Emulation */ 1565.5, /* Fourier */ 1.0132, /* Assignment */ 220.21, /* IDEA */ 112.93, /* Huffman */ 1.4799, /* Neural Net */ 26.732}; /* LU Decomposition */ /* ** Following are global structures, one built for ** each of the tests. */ SortStruct global_numsortstruct; /* For numeric sort */ SortStruct global_strsortstruct; /* For string sort */ BitOpStruct global_bitopstruct; /* For bitfield operations */ EmFloatStruct global_emfloatstruct; /* For emul. float. point */ FourierStruct global_fourierstruct; /* For fourier test */ AssignStruct global_assignstruct; /* For assignment algorithm */ IDEAStruct global_ideastruct; /* For IDEA encryption */ HuffStruct global_huffstruct; /* For Huffman compression */ NNetStruct global_nnetstruct; /* For Neural Net */ LUStruct global_lustruct; /* For LU decomposition */ /* ** EXTERNAL PROTOTYPES */ extern void DoNumSort(void); extern void DoStringSort(void); extern void DoBitops(void); extern void DoEmFloat(void); extern void DoFourier(void); extern void DoAssign(void); extern void DoIDEA(void); extern void DoHuffman(void); extern void DoNNET(void); extern void DoLU(void); /* ** Array of pointers to the benchmark functions. */ void (*funcpointer[])(void) = { DoNumSort, DoStringSort, DoBitops, DoEmFloat, DoFourier, DoAssign, DoIDEA, DoHuffman, DoNNET, DoLU };