Skip to content

Commit e0de34b

Browse files
committed
TurboPFor: Benchmark app
1 parent 5f75168 commit e0de34b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/icapp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,9 @@ void fpstat(unsigned char *in, size_t n, unsigned char *out, int s, unsigned cha
12251225
if(!_tmp) free(tmp);
12261226
for(ip = in, op = out; ip < in+n*esize; ip += esize, op += esize)
12271227
switch(s) {
1228+
#ifdef FLT16_MAX
12281229
case -2: isum += ctof16(ip); osum += ctof16(op); break;
1230+
#endif
12291231
case -4: isum += ctof32(ip); osum += ctof32(op); break;
12301232
case -8: isum += ctof64(ip); osum += ctof64(op); break;
12311233
case 1: isum += ctou8( ip); osum += ctou8( op); break;
@@ -1249,9 +1251,11 @@ void fpstat(unsigned char *in, size_t n, unsigned char *out, int s, unsigned cha
12491251
double id, od;
12501252
unsigned e; uint64_t m;
12511253
switch(s) {
1254+
#ifdef FLT16_MAX
12521255
case -2: { unsigned e; uint16_t m;id = ctof16(ip); od = ctof16(op); U(16); e = EXPO16(u); expo = clz16(zigzagenc16(e-expo))/*-(16-(16-MANTF16-1))*/; elb+=expo; expo = e;
12531256
m = MANT16(u); mant = ctz16( m^mant) ; mtb+=mant; mant = m;//ctz16(zigzagenc16(m-mant))
12541257
} break;
1258+
#endif
12551259
case -4: { unsigned e; uint32_t m;id = ctof32(ip); od = ctof32(op); U(32); e = EXPO32(u); expo = clz32(zigzagenc32(e-expo))/*-(32-(32-MANTF32-1))*/; elb+=expo; expo = e;
12561260
m = MANT32(u); mant = ctz32( m^mant) ; mtb+=mant; mant = m;//ctz32(zigzagenc32(m-mant))
12571261
} break;

0 commit comments

Comments
 (0)