1 /*
2  * LIBOIL - Library of Optimized Inner Loops
3  * Copyright (c) 2003,2004 David A. Schleef <ds@schleef.org>
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the
13  *    documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
19  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25  * POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #ifndef _LIBOIL_TYPES_H_
29 #define _LIBOIL_TYPES_H_
30 
31 #include <liboil/liboilutils.h>
32 #include <liboil/liboil-stdint.h>
33 
34 OIL_BEGIN_DECLS
35 
36 /**
37  * NULL:
38  *
39  * FIXME: gtk-doc is broken and doesn't know how to ignore this.
40  */
41 #ifndef NULL
42 #define NULL ((void *)0)
43 #endif
44 
45 /**
46  * SECTION:liboiltypes
47  * @short_description: Internal Liboil types
48  */
49 
50 typedef struct _OilFunctionClass OilFunctionClass;
51 typedef struct _OilFunctionImpl OilFunctionImpl;
52 typedef struct _OilParameter OilParameter;
53 typedef struct _OilTest OilTest;
54 
55 typedef void (*OilTestFunction) (OilTest *test);
56 
57 /**
58  * oil_type_s8:
59  *
60  * Useful for autogenerated code.  Do not use otherwise.
61  */
62 #define oil_type_s8 int8_t
63 /**
64  * oil_type_u8:
65  *
66  * Useful for autogenerated code.  Do not use otherwise.
67  */
68 #define oil_type_u8 uint8_t
69 /**
70  * oil_type_s16:
71  *
72  * Useful for autogenerated code.  Do not use otherwise.
73  */
74 #define oil_type_s16 int16_t
75 /**
76  * oil_type_u16:
77  *
78  * Useful for autogenerated code.  Do not use otherwise.
79  */
80 #define oil_type_u16 uint16_t
81 /**
82  * oil_type_s32:
83  *
84  * Useful for autogenerated code.  Do not use otherwise.
85  */
86 #define oil_type_s32 int32_t
87 /**
88  * oil_type_u32:
89  *
90  * Useful for autogenerated code.  Do not use otherwise.
91  */
92 #define oil_type_u32 uint32_t
93 /**
94  * oil_type_s64:
95  *
96  * Useful for autogenerated code.  Do not use otherwise.
97  */
98 #define oil_type_s64 int64_t
99 /**
100  * oil_type_u64:
101  *
102  * Useful for autogenerated code.  Do not use otherwise.
103  */
104 #define oil_type_u64 uint64_t
105 /**
106  * oil_type_f32:
107  *
108  * Useful for autogenerated code.  Do not use otherwise.
109  */
110 #define oil_type_f32 float
111 /**
112  * oil_type_f64:
113  *
114  * Useful for autogenerated code.  Do not use otherwise.
115  */
116 #define oil_type_f64 double
117 
118 #define oil_type_min_s8 (-128)
119 #define oil_type_min_u8 (0)
120 #define oil_type_min_s16 (-32768)
121 #define oil_type_min_u16 (0)
122 #define oil_type_min_s32 (-2147483647 - 1)
123 #define oil_type_min_u32 (0)
124 
125 #define oil_type_max_s8 (127)
126 #define oil_type_max_u8 (255)
127 #define oil_type_max_s16 (32767)
128 #define oil_type_max_u16 (65535)
129 #define oil_type_max_s32 (2147483647)
130 #define oil_type_max_u32 (4294967295U)
131 
132 /**
133  * oil_type_min_s8:
134  *
135  * Useful for autogenerated code.  Do not use otherwise.
136  */
137 /**
138  * oil_type_min_u8:
139  *
140  * Useful for autogenerated code.  Do not use otherwise.
141  */
142 /**
143  * oil_type_min_s16:
144  *
145  * Useful for autogenerated code.  Do not use otherwise.
146  */
147 /**
148  * oil_type_min_u16:
149  *
150  * Useful for autogenerated code.  Do not use otherwise.
151  */
152 /**
153  * oil_type_min_s32:
154  *
155  * Useful for autogenerated code.  Do not use otherwise.
156  */
157 /**
158  * oil_type_min_u32:
159  *
160  * Useful for autogenerated code.  Do not use otherwise.
161  */
162 /**
163  * oil_type_min_f32:
164  *
165  * Useful for autogenerated code.  Do not use otherwise.
166  */
167 /**
168  * oil_type_min_f64:
169  *
170  * Useful for autogenerated code.  Do not use otherwise.
171  */
172 
173 /**
174  * oil_type_max_s8:
175  *
176  * Useful for autogenerated code.  Do not use otherwise.
177  */
178 /**
179  * oil_type_max_u8:
180  *
181  * Useful for autogenerated code.  Do not use otherwise.
182  */
183 /**
184  * oil_type_max_s16:
185  *
186  * Useful for autogenerated code.  Do not use otherwise.
187  */
188 /**
189  * oil_type_max_u16:
190  *
191  * Useful for autogenerated code.  Do not use otherwise.
192  */
193 /**
194  * oil_type_max_s32:
195  *
196  * Useful for autogenerated code.  Do not use otherwise.
197  */
198 /**
199  * oil_type_max_u32:
200  *
201  * Useful for autogenerated code.  Do not use otherwise.
202  */
203 /**
204  * oil_type_max_f32:
205  *
206  * Useful for autogenerated code.  Do not use otherwise.
207  */
208 /**
209  * oil_type_max_f64:
210  *
211  * Useful for autogenerated code.  Do not use otherwise.
212  */
213 
214 OIL_END_DECLS
215 
216 #endif
217 
218