summaryrefslogtreecommitdiff
path: root/nbench1.h
blob: 6d0f63a074923d23c9534f8aff0f7eeaa9ef6da9 (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
/*
** nbench1.h
** Header for nbench1.c
** BYTEmark (tm)
** BYTE's Native Mode Benchmarks
** Rick Grehan, BYTE Magazine
**
** Creation:
** Revision: 3/95;10/95
**
** 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.
*/
#include <stdint.h>

/*
** DEFINES
*/
/* #define DEBUG */

/*
** EXTERNALS
*/
extern unsigned long global_min_ticks;

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;

#if 0
/* External PROTOTYPES */
/*extern unsigned long abs_randwc(unsigned long num);*/     /* From MISC */
/*extern long randnum(long lngval);*/
extern int32_t randwc(int32_t num);
extern uint32_t abs_randwc(uint32_t num);
extern int32_t randnum(int32_t lngval);

extern void *AllocateMemory(unsigned long nbytes,    /* From SYSSPEC */
	int *errorcode);
extern void FreeMemory(void *mempointer,
	int *errorcode);
extern void MoveMemory(void *destination,
		void *source, unsigned long nbytes);
extern void ReportError(char *context, int errorcode);
extern unsigned long StartStopwatch();
extern unsigned long StopStopwatch(unsigned long startticks);
extern unsigned long TicksToSecs(unsigned long tickamount);
extern double TicksToFracSecs(unsigned long tickamount);
/*****************
** NUMERIC SORT **
*****************/

/*
** PROTOTYPES
*/
void DoNumSort(void);

/****************
** STRING SORT **
*****************
*/


/*
** PROTOTYPES
*/
void DoStringSort(void);

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

/*
** PROTOTYPES
*/
void DoBitops(void);

/****************************
** EMULATED FLOATING POINT **
****************************/

/*
** PROTOTYPES
*/
void DoEmFloat(void);


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

/*
** PROTOTYPES
*/
void DoFourier(void);

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

void DoAssign(void);

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

void DoIDEA(void);

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

void DoHuffman(void);


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

void DoNNET(void);

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

void DoLU(void);
#endif