summaryrefslogtreecommitdiff
path: root/nmglobal.h
blob: 2f1018d5f0cce9ba1da6c70c2f0947dc03b7bcc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
/*
** nmglobal.h
** Global definitions for native mode benchmarks.
**
** 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.
*/

/*
** SYSTEM DEFINES
*/
#include <stdint.h>
#define TRUE 1
#define FALSE 0

#define MINIMUM_TICKS 60
#define MINIMUM_SECONDS 5 /* Minimum number of seconds to run each test */

/*****************
** NUMERIC SORT **
*****************/
/*
** DEFINES
*/

/*
** The following constant, NUMNUMARRAYS (no, it is not a
** Peter Sellers joke) is the maximum number of arrays
** that can be built by the numeric sorting benchmark
** before it gives up.  This maximum is dependent on the
** amount of memory in the system.
*/
/*#define NUMNUMARRAYS    1000*/
#define NUMNUMARRAYS    10000

/*
** The following constant NUMARRAYSIZE determines the
** default # of elements in each numeric array.  Ordinarily
** this is something you shouldn't fool with, though as
** with most of the constants here, it is adjustable.
*/
#define NUMARRAYSIZE    8111L


/*
** TYPEDEFS
*/
typedef struct {
        double results;     /* # of sort iterations per sec */
        unsigned long arraysize;        /* # of elements in array */
} SortStruct;

/****************
** STRING SORT **
*****************
** Note: The string sort benchmark uses the same structure to
** communicate parameters as does the numeric sort benchmark.
** (i.e., SortStruct...see above.
*/

/*
** DEFINES
*/
/*
** The following constant STRINGARRAYSIZE determines
** the default # of bytes allocated to each string array.
** Though the actual size can be pre-set from the command
** file, this constant should be left unchanged.
*/
#define STRINGARRAYSIZE 8111L

/************************
** BITFIELD OPERATIONS **
*************************
*/

/*
** DEFINES
*/

/*
** Following field sets the size of the bitfield array (in longs).
*/
#ifdef _LP64
#define BITFARRAYSIZE 16384L
#else
#define BITFARRAYSIZE 32768L
#endif

/*
** TYPEDEFS
*/
typedef struct {
        double results;    /* # of bitfield ops per sec */
        unsigned long bitoparraysize;           /* Total # of bitfield ops */
        unsigned long bitfieldarraysize;        /* Bit field array size */
} BitOpStruct;

/****************************
** EMULATED FLOATING POINT **
****************************/
/*
** DEFINES
*/
#define INTERNAL_FPF_PRECISION 4

/*
** The following constant is the maximum number of loops
** of the emulated floating point test that the system
** will allow before flagging an error.  This is not a
** critical constant, and can be altered if your system is
** a real barn-burner.
*/
/*#define CPUEMFLOATLOOPMAX 50000L*/
#define CPUEMFLOATLOOPMAX 500000L

/*
** Set size of array
*/
#define EMFARRAYSIZE 3000L

/*
** TYPEDEFS
*/
typedef struct {
        double results;         /* Results */
        unsigned long arraysize;        /* Size of array */
        unsigned long loops;            /* Loops per iterations */
} EmFloatStruct;

/*************************
** FOURIER COEFFICIENTS **
*************************/

/*
** TYPEDEFS
*/
typedef struct {
        double results;          /* Results */
        unsigned long arraysize;        /* Size of coeff. arrays */
} FourierStruct;

/*************************
** ASSIGNMENT ALGORITHM **
*************************/

/*
** TYPEDEFS
*/
typedef struct {
        double results;     /* Results */
} AssignStruct;

/********************
** IDEA ENCRYPTION **
********************/

/*
** DEFINES
*/
/* Following constant defines the max number of loops the
** system will attempt. Keeps things from going off into the
** weeds. */
/*#define MAXIDEALOOPS 50000L*/
#define MAXIDEALOOPS 500000L

/*
** Following constant sets the size of the arrays.
** NOTE: For the IDEA algorithm to work properly, this
**  number MUST be some multiple of 8.
*/
#define IDEAARRAYSIZE 4000L

/*
** TYPEDEFS
*/
typedef struct {
        double results;     /* Results */
        unsigned long arraysize;        /* Size of array */
        unsigned long loops;            /* # of times to convert */
} IDEAStruct;


/************************
** HUFFMAN COMPRESSION **
************************/

/*
** DEFINES
*/
/*
** MAXHUFFLOOPS
**
** This constant specifies the maximum number of Huffman
** compression loops the system will try for.  This keeps
** the test from going off into the weeds.  This is not
** a critical constant, and can be increased if your
** system is a real barn-burner.
*/
/*#define MAXHUFFLOOPS 50000L*/
#define MAXHUFFLOOPS 500000L

/*
** Following constant sets the size of the arrays to
** be compressed/uncompressed.
*/
#define HUFFARRAYSIZE 5000L

/*
** TYPEDEFS
*/

typedef struct {
        double results;     /* Results */
        unsigned long arraysize;        /* Size of array */
        unsigned long loops;            /* # of times to compress/decompress */
} HuffStruct;

/********************************
** BACK PROPAGATION NEURAL NET **
********************************/

/*
**  MAXNNETLOOPS
**
** This constant sets the max number of loops through the neural
** net that the system will attempt before giving up.  This
** is not a critical constant.  You can alter it if your system
** has sufficient horsepower.
*/
/*#define MAXNNETLOOPS  50000L*/
#define MAXNNETLOOPS  500000L

/*
** TYPEDEFS
*/
typedef struct {
        double results;     /* Results */
        unsigned long loops;            /* # of times to learn */
} NNetStruct;

/***********************
**  LU DECOMPOSITION  **
** (Linear Equations) **
***********************/

/*
** MAXLUARRAYS
**
** This sets the upper limit on the number of arrays
** that the benchmark will attempt to build before
** flagging an error.  It is not a critical constant, and
** may be increased if your system has the horsepower.
*/
/*#define MAXLUARRAYS 1000*/
#define MAXLUARRAYS 10000

/*
** TYPEDEFS
*/
typedef struct {
        double results;     /* Results */
} LUStruct;

extern SortStruct global_numsortstruct;
extern SortStruct global_strsortstruct;
extern BitOpStruct global_bitopstruct;
extern EmFloatStruct global_emfloatstruct;
extern FourierStruct global_fourierstruct;
extern AssignStruct global_assignstruct;
extern IDEAStruct global_ideastruct;
extern HuffStruct global_huffstruct;
extern NNetStruct global_nnetstruct;
extern LUStruct global_lustruct;