diff options
Diffstat (limited to 'baseline/source/audiobeam/audiobeamlibmath.h')
-rw-r--r-- | baseline/source/audiobeam/audiobeamlibmath.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/baseline/source/audiobeam/audiobeamlibmath.h b/baseline/source/audiobeam/audiobeamlibmath.h new file mode 100644 index 0000000..77bda0f --- /dev/null +++ b/baseline/source/audiobeam/audiobeamlibmath.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | |||
3 | This program is part of the TACLeBench benchmark suite. | ||
4 | Version V 2.0 | ||
5 | |||
6 | Name: audiobeamlibmath.h | ||
7 | |||
8 | Author: Unknown | ||
9 | |||
10 | Function: IEEE754 software library routines. | ||
11 | |||
12 | Source: Sun Microsystems | ||
13 | |||
14 | Original name: math_private.h | ||
15 | |||
16 | Changes: No major functional changes. | ||
17 | |||
18 | License: See the terms below. | ||
19 | |||
20 | */ | ||
21 | |||
22 | |||
23 | /* | ||
24 | ==================================================== | ||
25 | Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. | ||
26 | |||
27 | Developed at SunPro, a Sun Microsystems, Inc. business. | ||
28 | Permission to use, copy, modify, and distribute this | ||
29 | software is freely granted, provided that this notice | ||
30 | is preserved. | ||
31 | ==================================================== | ||
32 | */ | ||
33 | |||
34 | /* | ||
35 | from: @(#)fdlibm.h 5.1 93/09/24 | ||
36 | */ | ||
37 | |||
38 | #ifndef AUDIOBEAM_MATH_PRIVATE_H_ | ||
39 | #define AUDIOBEAM_MATH_PRIVATE_H_ | ||
40 | |||
41 | #include "audiobeamlibm.h" | ||
42 | |||
43 | /* A union which permits us to convert between a float and a 32 bit | ||
44 | int. */ | ||
45 | |||
46 | typedef union { | ||
47 | float value; | ||
48 | unsigned int word; | ||
49 | } audiobeam_ieee_float_shape_type; | ||
50 | |||
51 | /* Get a 32 bit int from a float. */ | ||
52 | |||
53 | #define AUDIOBEAM_GET_FLOAT_WORD(i,d) \ | ||
54 | { \ | ||
55 | audiobeam_ieee_float_shape_type gf_u; \ | ||
56 | gf_u.value = (d); \ | ||
57 | (i) = gf_u.word; \ | ||
58 | } | ||
59 | |||
60 | /* Set a float from a 32 bit int. */ | ||
61 | |||
62 | #define AUDIOBEAM_SET_FLOAT_WORD(d,i) \ | ||
63 | { \ | ||
64 | audiobeam_ieee_float_shape_type sf_u; \ | ||
65 | sf_u.word = (i); \ | ||
66 | (d) = sf_u.value; \ | ||
67 | } | ||
68 | |||
69 | #endif /* _MATH_PRIVATE_H_ */ | ||