00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifdef __cplusplus
00022 extern "C" {
00023 #endif
00024
00025 #ifndef __FLGR_CORE_ARITH_DEF_H
00026 #define __FLGR_CORE_ARITH_DEF_H
00027
00028 #include <flgrCoreDll.h>
00029 #include <flgrCoreData.h>
00030 #include <math.h>
00031 #include <stdlib.h>
00032
00033 static __inline__ fgBIT flgr_defop_inf_fgBIT(fgBIT a,fgBIT b) {
00034 return (a&b);
00035 }
00036 static __inline__ fgUINT8 flgr_defop_inf_fgUINT8(fgUINT8 a,fgUINT8 b) {
00037 return (a<b?a:b);
00038 }
00039 static __inline__ fgUINT16 flgr_defop_inf_fgUINT16(fgUINT16 a,fgUINT16 b) {
00040 return (a<b?a:b);
00041 }
00042 static __inline__ fgUINT32 flgr_defop_inf_fgUINT32(fgUINT32 a,fgUINT32 b) {
00043 return (a<b?a:b);
00044 }
00045 static __inline__ fgUINT64 flgr_defop_inf_fgUINT64(fgUINT64 a,fgUINT64 b) {
00046 return (a<b?a:b);
00047 }
00048 static __inline__ fgINT8 flgr_defop_inf_fgINT8(fgINT8 a,fgINT8 b) {
00049 return (a<b?a:b);
00050 }
00051 static __inline__ fgINT16 flgr_defop_inf_fgINT16(fgINT16 a,fgINT16 b) {
00052 return (a<b?a:b);
00053 }
00054 static __inline__ fgINT32 flgr_defop_inf_fgINT32(fgINT32 a,fgINT32 b) {
00055 return (a<b?a:b);
00056 }
00057 static __inline__ fgINT64 flgr_defop_inf_fgINT64(fgINT64 a,fgINT64 b) {
00058 return (a<b?a:b);
00059 }
00060 static __inline__ fgFLOAT32 flgr_defop_inf_fgFLOAT32(fgFLOAT32 a,fgFLOAT32 b) {
00061 return (a<b?a:b);
00062 }
00063 static __inline__ fgFLOAT64 flgr_defop_inf_fgFLOAT64(fgFLOAT64 a,fgFLOAT64 b) {
00064 return (a<b?a:b);
00065 }
00066
00067 static __inline__ fgBIT flgr_defop_sup_fgBIT(fgBIT a,fgBIT b) {
00068 return (a|b);
00069 }
00070 static __inline__ fgUINT8 flgr_defop_sup_fgUINT8(fgUINT8 a,fgUINT8 b) {
00071 return (a<b?b:a);
00072 }
00073 static __inline__ fgUINT16 flgr_defop_sup_fgUINT16(fgUINT16 a,fgUINT16 b) {
00074 return (a<b?b:a);
00075 }
00076 static __inline__ fgUINT32 flgr_defop_sup_fgUINT32(fgUINT32 a,fgUINT32 b) {
00077 return (a<b?b:a);
00078 }
00079 static __inline__ fgUINT64 flgr_defop_sup_fgUINT64(fgUINT64 a,fgUINT64 b) {
00080 return (a<b?b:a);
00081 }
00082 static __inline__ fgINT8 flgr_defop_sup_fgINT8(fgINT8 a,fgINT8 b) {
00083 return (a<b?b:a);
00084 }
00085 static __inline__ fgINT16 flgr_defop_sup_fgINT16(fgINT16 a,fgINT16 b) {
00086 return (a<b?b:a);
00087 }
00088 static __inline__ fgINT32 flgr_defop_sup_fgINT32(fgINT32 a,fgINT32 b) {
00089 return (a<b?b:a);
00090 }
00091 static __inline__ fgINT64 flgr_defop_sup_fgINT64(fgINT64 a,fgINT64 b) {
00092 return (a<b?b:a);
00093 }
00094 static __inline__ fgFLOAT32 flgr_defop_sup_fgFLOAT32(fgFLOAT32 a,fgFLOAT32 b) {
00095 return (a<b?b:a);
00096 }
00097 static __inline__ fgFLOAT64 flgr_defop_sup_fgFLOAT64(fgFLOAT64 a,fgFLOAT64 b) {
00098 return (a<b?b:a);
00099 }
00100
00101 static __inline__ fgBIT flgr_defop_not_fgBIT(fgBIT a) {
00102 return ~a;
00103 }
00104 static __inline__ fgUINT8 flgr_defop_not_fgUINT8(fgUINT8 a) {
00105 return ~a;
00106 }
00107 static __inline__ fgUINT16 flgr_defop_not_fgUINT16(fgUINT16 a) {
00108 return ~a;
00109 }
00110 static __inline__ fgUINT32 flgr_defop_not_fgUINT32(fgUINT32 a) {
00111 return ~a;
00112 }
00113 static __inline__ fgUINT64 flgr_defop_not_fgUINT64(fgUINT64 a) {
00114 return ~a;
00115 }
00116 static __inline__ fgINT8 flgr_defop_not_fgINT8(fgINT8 a) {
00117 return ~a;
00118 }
00119 static __inline__ fgINT16 flgr_defop_not_fgINT16(fgINT16 a) {
00120 return ~a;
00121 }
00122 static __inline__ fgINT32 flgr_defop_not_fgINT32(fgINT32 a) {
00123 return ~a;
00124 }
00125 static __inline__ fgINT64 flgr_defop_not_fgINT64(fgINT64 a) {
00126 return ~a;
00127 }
00128
00129 static __inline__ fgBIT flgr_defop_nand_fgBIT(fgBIT a,fgBIT b) {
00130 return ~(a&b);
00131 }
00132 static __inline__ fgUINT8 flgr_defop_nand_fgUINT8(fgUINT8 a,fgUINT8 b) {
00133 return ~(a&b);
00134 }
00135 static __inline__ fgUINT16 flgr_defop_nand_fgUINT16(fgUINT16 a,fgUINT16 b) {
00136 return ~(a&b);
00137 }
00138 static __inline__ fgUINT32 flgr_defop_nand_fgUINT32(fgUINT32 a,fgUINT32 b) {
00139 return ~(a&b);
00140 }
00141 static __inline__ fgUINT64 flgr_defop_nand_fgUINT64(fgUINT64 a,fgUINT64 b) {
00142 return ~(a&b);
00143 }
00144 static __inline__ fgINT8 flgr_defop_nand_fgINT8(fgINT8 a,fgINT8 b) {
00145 return ~(a&b);
00146 }
00147 static __inline__ fgINT16 flgr_defop_nand_fgINT16(fgINT16 a,fgINT16 b) {
00148 return ~(a&b);
00149 }
00150 static __inline__ fgINT32 flgr_defop_nand_fgINT32(fgINT32 a,fgINT32 b) {
00151 return ~(a&b);
00152 }
00153 static __inline__ fgINT64 flgr_defop_nand_fgINT64(fgINT64 a,fgINT64 b) {
00154 return ~(a&b);
00155 }
00156
00157 static __inline__ fgBIT flgr_defop_and_fgBIT(fgBIT a,fgBIT b) {
00158 return (a & b);
00159 }
00160 static __inline__ fgUINT8 flgr_defop_and_fgUINT8(fgUINT8 a,fgUINT8 b) {
00161 return a&b;
00162 }
00163 static __inline__ fgUINT16 flgr_defop_and_fgUINT16(fgUINT16 a,fgUINT16 b) {
00164 return a&b;
00165 }
00166 static __inline__ fgUINT32 flgr_defop_and_fgUINT32(fgUINT32 a,fgUINT32 b) {
00167 return a&b;
00168 }
00169 static __inline__ fgUINT64 flgr_defop_and_fgUINT64(fgUINT64 a,fgUINT64 b) {
00170 return a&b;
00171 }
00172 static __inline__ fgINT8 flgr_defop_and_fgINT8(fgINT8 a,fgINT8 b) {
00173 return a&b;
00174 }
00175 static __inline__ fgINT16 flgr_defop_and_fgINT16(fgINT16 a,fgINT16 b) {
00176 return a&b;
00177 }
00178 static __inline__ fgINT32 flgr_defop_and_fgINT32(fgINT32 a,fgINT32 b) {
00179 return a&b;
00180 }
00181 static __inline__ fgINT64 flgr_defop_and_fgINT64(fgINT64 a,fgINT64 b) {
00182 return a&b;
00183 }
00184
00185 static __inline__ fgBIT flgr_defop_or_fgBIT(fgBIT a,fgBIT b) {
00186 return (a | b);
00187 }
00188 static __inline__ fgUINT8 flgr_defop_or_fgUINT8(fgUINT8 a,fgUINT8 b) {
00189 return a|b;
00190 }
00191 static __inline__ fgUINT16 flgr_defop_or_fgUINT16(fgUINT16 a,fgUINT16 b) {
00192 return a|b;
00193 }
00194 static __inline__ fgUINT32 flgr_defop_or_fgUINT32(fgUINT32 a,fgUINT32 b) {
00195 return a|b;
00196 }
00197 static __inline__ fgUINT64 flgr_defop_or_fgUINT64(fgUINT64 a,fgUINT64 b) {
00198 return a|b;
00199 }
00200 static __inline__ fgINT8 flgr_defop_or_fgINT8(fgINT8 a,fgINT8 b) {
00201 return a|b;
00202 }
00203 static __inline__ fgINT16 flgr_defop_or_fgINT16(fgINT16 a,fgINT16 b) {
00204 return a|b;
00205 }
00206 static __inline__ fgINT32 flgr_defop_or_fgINT32(fgINT32 a,fgINT32 b) {
00207 return a|b;
00208 }
00209 static __inline__ fgINT64 flgr_defop_or_fgINT64(fgINT64 a,fgINT64 b) {
00210 return a|b;
00211 }
00212
00213 static __inline__ fgBIT flgr_defop_nor_fgBIT(fgBIT a,fgBIT b) {
00214 return ~(a|b);
00215 }
00216 static __inline__ fgUINT8 flgr_defop_nor_fgUINT8(fgUINT8 a,fgUINT8 b) {
00217 return ~(a|b);
00218 }
00219 static __inline__ fgUINT16 flgr_defop_nor_fgUINT16(fgUINT16 a,fgUINT16 b) {
00220 return ~(a|b);
00221 }
00222 static __inline__ fgUINT32 flgr_defop_nor_fgUINT32(fgUINT32 a,fgUINT32 b) {
00223 return ~(a|b);
00224 }
00225 static __inline__ fgUINT64 flgr_defop_nor_fgUINT64(fgUINT64 a,fgUINT64 b) {
00226 return ~(a|b);
00227 }
00228 static __inline__ fgINT8 flgr_defop_nor_fgINT8(fgINT8 a,fgINT8 b) {
00229 return ~(a|b);
00230 }
00231 static __inline__ fgINT16 flgr_defop_nor_fgINT16(fgINT16 a,fgINT16 b) {
00232 return ~(a|b);
00233 }
00234 static __inline__ fgINT32 flgr_defop_nor_fgINT32(fgINT32 a,fgINT32 b) {
00235 return ~(a|b);
00236 }
00237 static __inline__ fgINT64 flgr_defop_nor_fgINT64(fgINT64 a,fgINT64 b) {
00238 return ~(a|b);
00239 }
00240
00241
00242 static __inline__ fgBIT flgr_defop_xor_fgBIT(fgBIT a,fgBIT b) {
00243 return (a ^ b);
00244 }
00245 static __inline__ fgUINT8 flgr_defop_xor_fgUINT8(fgUINT8 a,fgUINT8 b) {
00246 return a^b;
00247 }
00248 static __inline__ fgUINT16 flgr_defop_xor_fgUINT16(fgUINT16 a,fgUINT16 b) {
00249 return a^b;
00250 }
00251 static __inline__ fgUINT32 flgr_defop_xor_fgUINT32(fgUINT32 a,fgUINT32 b) {
00252 return a^b;
00253 }
00254 static __inline__ fgUINT64 flgr_defop_xor_fgUINT64(fgUINT64 a,fgUINT64 b) {
00255 return a^b;
00256 }
00257 static __inline__ fgINT8 flgr_defop_xor_fgINT8(fgINT8 a,fgINT8 b) {
00258 return a^b;
00259 }
00260 static __inline__ fgINT16 flgr_defop_xor_fgINT16(fgINT16 a,fgINT16 b) {
00261 return a^b;
00262 }
00263 static __inline__ fgINT32 flgr_defop_xor_fgINT32(fgINT32 a,fgINT32 b) {
00264 return a^b;
00265 }
00266 static __inline__ fgINT64 flgr_defop_xor_fgINT64(fgINT64 a,fgINT64 b) {
00267 return a^b;
00268 }
00269
00270
00271 static __inline__ fgBIT flgr_defop_nxor_fgBIT(fgBIT a,fgBIT b) {
00272 return ~(a^b);
00273 }
00274 static __inline__ fgUINT8 flgr_defop_nxor_fgUINT8(fgUINT8 a,fgUINT8 b) {
00275 return ~(a^b);
00276 }
00277 static __inline__ fgUINT16 flgr_defop_nxor_fgUINT16(fgUINT16 a,fgUINT16 b) {
00278 return ~(a^b);
00279 }
00280 static __inline__ fgUINT32 flgr_defop_nxor_fgUINT32(fgUINT32 a,fgUINT32 b) {
00281 return ~(a^b);
00282 }
00283 static __inline__ fgUINT64 flgr_defop_nxor_fgUINT64(fgUINT64 a,fgUINT64 b) {
00284 return ~(a^b);
00285 }
00286 static __inline__ fgINT8 flgr_defop_nxor_fgINT8(fgINT8 a,fgINT8 b) {
00287 return ~(a^b);
00288 }
00289 static __inline__ fgINT16 flgr_defop_nxor_fgINT16(fgINT16 a,fgINT16 b) {
00290 return ~(a^b);
00291 }
00292 static __inline__ fgINT32 flgr_defop_nxor_fgINT32(fgINT32 a,fgINT32 b) {
00293 return ~(a^b);
00294 }
00295 static __inline__ fgINT64 flgr_defop_nxor_fgINT64(fgINT64 a,fgINT64 b) {
00296 return ~(a^b);
00297 }
00298
00299
00300 static __inline__ fgUINT8 flgr_defop_add_fgUINT8(fgUINT8 a,fgUINT8 b) {
00301 return a+b;
00302 }
00303 static __inline__ fgUINT16 flgr_defop_add_fgUINT16(fgUINT16 a,fgUINT16 b) {
00304 return a+b;
00305 }
00306 static __inline__ fgUINT32 flgr_defop_add_fgUINT32(fgUINT32 a,fgUINT32 b) {
00307 return a+b;
00308 }
00309 static __inline__ fgUINT64 flgr_defop_add_fgUINT64(fgUINT64 a,fgUINT64 b) {
00310 return a+b;
00311 }
00312 static __inline__ fgINT8 flgr_defop_add_fgINT8(fgINT8 a,fgINT8 b) {
00313 return a+b;
00314 }
00315 static __inline__ fgINT16 flgr_defop_add_fgINT16(fgINT16 a,fgINT16 b) {
00316 return a+b;
00317 }
00318 static __inline__ fgINT32 flgr_defop_add_fgINT32(fgINT32 a,fgINT32 b) {
00319 return a+b;
00320 }
00321 static __inline__ fgINT64 flgr_defop_add_fgINT64(fgINT64 a,fgINT64 b) {
00322 return a+b;
00323 }
00324 static __inline__ fgFLOAT32 flgr_defop_add_fgFLOAT32(fgFLOAT32 a,fgFLOAT32 b) {
00325 return a+b;
00326 }
00327 static __inline__ fgFLOAT64 flgr_defop_add_fgFLOAT64(fgFLOAT64 a,fgFLOAT64 b) {
00328 return a+b;
00329 }
00330
00331 static __inline__ fgUINT8 flgr_defop_sub_a_b_fgUINT8(fgUINT8 a,fgUINT8 b) {
00332 return a-b;
00333 }
00334 static __inline__ fgUINT16 flgr_defop_sub_a_b_fgUINT16(fgUINT16 a,fgUINT16 b) {
00335 return a-b;
00336 }
00337 static __inline__ fgUINT32 flgr_defop_sub_a_b_fgUINT32(fgUINT32 a,fgUINT32 b) {
00338 return a-b;
00339 }
00340 static __inline__ fgUINT64 flgr_defop_sub_a_b_fgUINT64(fgUINT64 a,fgUINT64 b) {
00341 return a-b;
00342 }
00343 static __inline__ fgINT8 flgr_defop_sub_a_b_fgINT8(fgINT8 a,fgINT8 b) {
00344 return a-b;
00345 }
00346 static __inline__ fgINT16 flgr_defop_sub_a_b_fgINT16(fgINT16 a,fgINT16 b) {
00347 return a-b;
00348 }
00349 static __inline__ fgINT32 flgr_defop_sub_a_b_fgINT32(fgINT32 a,fgINT32 b) {
00350 return a-b;
00351 }
00352 static __inline__ fgINT64 flgr_defop_sub_a_b_fgINT64(fgINT64 a,fgINT64 b) {
00353 return a-b;
00354 }
00355 static __inline__ fgFLOAT32 flgr_defop_sub_a_b_fgFLOAT32(fgFLOAT32 a,fgFLOAT32 b) {
00356 return a-b;
00357 }
00358 static __inline__ fgFLOAT64 flgr_defop_sub_a_b_fgFLOAT64(fgFLOAT64 a,fgFLOAT64 b) {
00359 return a-b;
00360 }
00361
00362 static __inline__ fgUINT8 flgr_defop_sub_b_a_fgUINT8(fgUINT8 a,fgUINT8 b) {
00363 return b-a;
00364 }
00365 static __inline__ fgUINT16 flgr_defop_sub_b_a_fgUINT16(fgUINT16 a,fgUINT16 b) {
00366 return b-a;
00367 }
00368 static __inline__ fgUINT32 flgr_defop_sub_b_a_fgUINT32(fgUINT32 a,fgUINT32 b) {
00369 return b-a;
00370 }
00371 static __inline__ fgUINT64 flgr_defop_sub_b_a_fgUINT64(fgUINT64 a,fgUINT64 b) {
00372 return b-a;
00373 }
00374 static __inline__ fgINT8 flgr_defop_sub_b_a_fgINT8(fgINT8 a,fgINT8 b) {
00375 return b-a;
00376 }
00377 static __inline__ fgINT16 flgr_defop_sub_b_a_fgINT16(fgINT16 a,fgINT16 b) {
00378 return b-a;
00379 }
00380 static __inline__ fgINT32 flgr_defop_sub_b_a_fgINT32(fgINT32 a,fgINT32 b) {
00381 return b-a;
00382 }
00383 static __inline__ fgINT64 flgr_defop_sub_b_a_fgINT64(fgINT64 a,fgINT64 b) {
00384 return b-a;
00385 }
00386 static __inline__ fgFLOAT32 flgr_defop_sub_b_a_fgFLOAT32(fgFLOAT32 a,fgFLOAT32 b) {
00387 return b-a;
00388 }
00389 static __inline__ fgFLOAT64 flgr_defop_sub_b_a_fgFLOAT64(fgFLOAT64 a,fgFLOAT64 b) {
00390 return b-a;
00391 }
00392
00393 static __inline__ fgUINT8 flgr_defop_mult_fgUINT8(fgUINT8 a,fgUINT8 b) {
00394 return a*b;
00395 }
00396 static __inline__ fgUINT16 flgr_defop_mult_fgUINT16(fgUINT16 a,fgUINT16 b) {
00397 return a*b;
00398 }
00399 static __inline__ fgUINT32 flgr_defop_mult_fgUINT32(fgUINT32 a,fgUINT32 b) {
00400 return a*b;
00401 }
00402 static __inline__ fgUINT64 flgr_defop_mult_fgUINT64(fgUINT64 a,fgUINT64 b) {
00403 return a*b;
00404 }
00405 static __inline__ fgINT8 flgr_defop_mult_fgINT8(fgINT8 a,fgINT8 b) {
00406 return a*b;
00407 }
00408 static __inline__ fgINT16 flgr_defop_mult_fgINT16(fgINT16 a,fgINT16 b) {
00409 return a*b;
00410 }
00411 static __inline__ fgINT32 flgr_defop_mult_fgINT32(fgINT32 a,fgINT32 b) {
00412 return a*b;
00413 }
00414 static __inline__ fgINT64 flgr_defop_mult_fgINT64(fgINT64 a,fgINT64 b) {
00415 return a*b;
00416 }
00417 static __inline__ fgFLOAT32 flgr_defop_mult_fgFLOAT32(fgFLOAT32 a,fgFLOAT32 b) {
00418 return a*b;
00419 }
00420 static __inline__ fgFLOAT64 flgr_defop_mult_fgFLOAT64(fgFLOAT64 a,fgFLOAT64 b) {
00421 return a*b;
00422 }
00423
00424 static __inline__ fgUINT8 flgr_defop_div_fgUINT8(fgUINT8 a,fgUINT8 b) {
00425 return a/b;
00426 }
00427 static __inline__ fgUINT16 flgr_defop_div_fgUINT16(fgUINT16 a,fgUINT16 b) {
00428 return a/b;
00429 }
00430 static __inline__ fgUINT32 flgr_defop_div_fgUINT32(fgUINT32 a,fgUINT32 b) {
00431 return a/b;
00432 }
00433 static __inline__ fgUINT64 flgr_defop_div_fgUINT64(fgUINT64 a,fgUINT64 b) {
00434 return a/b;
00435 }
00436 static __inline__ fgINT8 flgr_defop_div_fgINT8(fgINT8 a,fgINT8 b) {
00437 return a/b;
00438 }
00439 static __inline__ fgINT16 flgr_defop_div_fgINT16(fgINT16 a,fgINT16 b) {
00440 return a/b;
00441 }
00442 static __inline__ fgINT32 flgr_defop_div_fgINT32(fgINT32 a,fgINT32 b) {
00443 return a/b;
00444 }
00445 static __inline__ fgINT64 flgr_defop_div_fgINT64(fgINT64 a,fgINT64 b) {
00446 return a/b;
00447 }
00448 static __inline__ fgFLOAT32 flgr_defop_div_fgFLOAT32(fgFLOAT32 a,fgFLOAT32 b) {
00449 return a/b;
00450 }
00451 static __inline__ fgFLOAT64 flgr_defop_div_fgFLOAT64(fgFLOAT64 a,fgFLOAT64 b) {
00452 return a/b;
00453 }
00454
00455 static __inline__ fgUINT8 flgr_defop_addsat_fgUINT8(fgUINT8 a,fgUINT8 b) {
00456 fgUINT32 x;
00457 x=((fgUINT32) a) + ((fgUINT32) b);
00458 if(x>MAX_fgUINT8) return MAX_fgUINT8;
00459 else return (fgUINT8) x;
00460 }
00461 static __inline__ fgUINT16 flgr_defop_addsat_fgUINT16(fgUINT16 a,fgUINT16 b) {
00462 fgUINT32 x;
00463 x=((fgUINT32) a) + ((fgUINT32) b);
00464 if(x>MAX_fgUINT16) return MAX_fgUINT16;
00465 else return (fgUINT16) x;
00466 }
00467 static __inline__ fgUINT32 flgr_defop_addsat_fgUINT32(fgUINT32 a,fgUINT32 b) {
00468 long long x;
00469 x=((long long) a) + ((long long) b);
00470 if(x>MAX_fgUINT32) return MAX_fgUINT32;
00471 else return (fgUINT32) x;
00472 }
00473 static __inline__ fgINT8 flgr_defop_addsat_fgINT8(fgINT8 a,fgINT8 b) {
00474 fgINT32 x;
00475 x=((fgINT32) a) + ((fgINT32) b);
00476 if(x>MAX_fgINT8) return MAX_fgINT8;
00477 else return (fgINT8) x;
00478 }
00479 static __inline__ fgINT16 flgr_defop_addsat_fgINT16(fgINT16 a,fgINT16 b) {
00480 fgINT32 x;
00481 x=((fgINT32) a) + ((fgINT32) b);
00482 if(x>MAX_fgINT16) return MAX_fgINT16;
00483 else return (fgINT16) x;
00484 }
00485 static __inline__ fgINT32 flgr_defop_addsat_fgINT32(fgINT32 a,fgINT32 b) {
00486 long long x;
00487 x=((long long) a) + ((long long) b);
00488 if(x>MAX_fgINT32) return MAX_fgINT32;
00489 else return (fgINT32) x;
00490 }
00491
00492 static __inline__ fgUINT8 flgr_defop_subsat_fgUINT8(fgUINT8 a,fgUINT8 b) {
00493 fgINT32 x;
00494 x=((fgINT32) a) - ((fgINT32) b);
00495 if(x<0) return 0;
00496 else return (fgUINT8) x;
00497 }
00498 static __inline__ fgUINT16 flgr_defop_subsat_fgUINT16(fgUINT16 a,fgUINT16 b) {
00499 fgINT32 x;
00500 x=((fgINT32) a) - ((fgINT32) b);
00501 if(x<0) return 0;
00502 else return (fgUINT16) x;
00503 }
00504 static __inline__ fgUINT32 flgr_defop_subsat_fgUINT32(fgUINT32 a,fgUINT32 b) {
00505 long long x;
00506 x=((long long) a) - ((long long) b);
00507 if(x<0) return 0;
00508 else return (fgUINT32) x;
00509 }
00510 static __inline__ fgINT8 flgr_defop_subsat_fgINT8(fgINT8 a,fgINT8 b) {
00511 fgINT32 x;
00512 x=((fgINT32) a) - ((fgINT32) b);
00513 if(x<MIN_fgINT8) return MIN_fgINT8;
00514 else return (fgINT8) x;
00515 }
00516 static __inline__ fgINT16 flgr_defop_subsat_fgINT16(fgINT16 a,fgINT16 b) {
00517 fgINT32 x;
00518 x=((fgINT32) a) - ((fgINT32) b);
00519 if(x<MIN_fgINT16) return MIN_fgINT16;
00520 else return (fgINT16) x;
00521 }
00522 static __inline__ fgINT32 flgr_defop_subsat_fgINT32(fgINT32 a,fgINT32 b) {
00523 long long x;
00524 x=((long long) a) - ((long long) b);
00525 if(x<MIN_fgINT32) return MIN_fgINT32;
00526 else return (fgINT32) x;
00527 }
00528
00529 static __inline__ fgUINT8 flgr_defop_multsat_fgUINT8(fgUINT8 a,fgUINT8 b) {
00530 fgINT32 x;
00531 x=((fgINT32) a) * ((fgINT32) b);
00532 if(x>MAX_fgUINT8) return MAX_fgUINT8;
00533 else return (fgUINT8) x;
00534 }
00535 static __inline__ fgUINT16 flgr_defop_multsat_fgUINT16(fgUINT16 a,fgUINT16 b) {
00536 fgINT32 x;
00537 x=((fgINT32) a) * ((fgINT32) b);
00538 if(x>MAX_fgUINT16) return MAX_fgUINT16;
00539 else return (fgUINT16) x;
00540 }
00541 static __inline__ fgUINT32 flgr_defop_multsat_fgUINT32(fgUINT32 a,fgUINT32 b) {
00542 long long x;
00543 x=((long long) a) * ((long long) b);
00544 if(x>MAX_fgUINT32) return MAX_fgUINT32;
00545 else return (fgUINT32) x;
00546 }
00547 static __inline__ fgINT8 flgr_defop_multsat_fgINT8(fgINT8 a,fgINT8 b) {
00548 fgINT32 x;
00549 x=((fgINT32) a) * ((fgINT32) b);
00550 if(x>MAX_fgINT8) return MAX_fgINT8;
00551 else return (fgINT8) x;
00552 }
00553 static __inline__ fgINT16 flgr_defop_multsat_fgINT16(fgINT16 a,fgINT16 b) {
00554 fgINT32 x;
00555 x=((fgINT32) a) * ((fgINT32) b);
00556 if(x>MAX_fgINT16) return MAX_fgINT16;
00557 else return (fgINT16) x;
00558 }
00559 static __inline__ fgINT32 flgr_defop_multsat_fgINT32(fgINT32 a,fgINT32 b) {
00560 long long x;
00561 x=((long long) a) * ((long long) b);
00562 if(x>MAX_fgINT32) return MAX_fgINT32;
00563 else return (fgINT32) x;
00564 }
00565
00566 static __inline__ fgUINT8 flgr_defop_module_fgUINT8(fgUINT8 a,fgUINT8 b) {
00567 double tmp;
00568 tmp=pow(a,2)+pow(b,2);
00569 return (fgUINT8) (sqrt(tmp));
00570 }
00571 static __inline__ fgUINT16 flgr_defop_module_fgUINT16(fgUINT16 a,fgUINT16 b) {
00572 double tmp;
00573 tmp=pow(a,2)+pow(b,2);
00574 return (fgUINT16) (sqrt(tmp));
00575 }
00576 static __inline__ fgUINT32 flgr_defop_module_fgUINT32(fgUINT32 a,fgUINT32 b) {
00577 double tmp;
00578 tmp=pow(a,2)+pow(b,2);
00579 return (fgUINT32) (sqrt(tmp));
00580 }
00581 static __inline__ fgUINT64 flgr_defop_module_fgUINT64(fgUINT64 a,fgUINT64 b) {
00582 double tmp;
00583 tmp=pow(a,2)+pow(b,2);
00584 return (fgUINT64) (sqrt(tmp));
00585 }
00586 static __inline__ fgINT8 flgr_defop_module_fgINT8(fgINT8 a,fgINT8 b) {
00587 double tmp;
00588 tmp=pow(a,2)+pow(b,2);
00589 return (fgINT8) (sqrt(tmp));
00590 }
00591 static __inline__ fgINT16 flgr_defop_module_fgINT16(fgINT16 a,fgINT16 b) {
00592 double tmp;
00593 tmp=pow(a,2)+pow(b,2);
00594 return (fgINT16) (sqrt(tmp));
00595 }
00596 static __inline__ fgINT32 flgr_defop_module_fgINT32(fgINT32 a,fgINT32 b) {
00597 double tmp;
00598 tmp=pow(a,2)+pow(b,2);
00599 return (fgINT32) (sqrt(tmp));
00600 }
00601 static __inline__ fgINT64 flgr_defop_module_fgINT64(fgINT64 a,fgINT64 b) {
00602 double tmp;
00603 tmp=pow(a,2)+pow(b,2);
00604 return (fgINT64) (sqrt(tmp));
00605 }
00606 static __inline__ fgFLOAT32 flgr_defop_module_fgFLOAT32(fgFLOAT32 a,fgFLOAT32 b) {
00607 double tmp;
00608 tmp=pow(a,2)+pow(b,2);
00609 return (fgFLOAT32) (sqrt(tmp));
00610 }
00611 static __inline__ fgFLOAT64 flgr_defop_module_fgFLOAT64(fgFLOAT64 a,fgFLOAT64 b) {
00612 double tmp;
00613 tmp=pow(a,2)+pow(b,2);
00614 return (fgFLOAT64) (sqrt(tmp));
00615 }
00616
00617 static __inline__ fgUINT8 flgr_defop_argument_fgUINT8(fgUINT8 a,fgUINT8 b) {
00618 double tmp;
00619 tmp=pow(a,2)+pow(b,2);
00620 tmp=sqrt(tmp);
00621 tmp=acos(a/tmp);
00622 return (fgUINT8) tmp;
00623 }
00624 static __inline__ fgUINT16 flgr_defop_argument_fgUINT16(fgUINT16 a,fgUINT16 b) {
00625 double tmp;
00626 tmp=pow(a,2)+pow(b,2);
00627 tmp=sqrt(tmp);
00628 tmp=acos(a/tmp);
00629 return (fgUINT16) tmp;
00630 }
00631 static __inline__ fgUINT32 flgr_defop_argument_fgUINT32(fgUINT32 a,fgUINT32 b) {
00632 double tmp;
00633 tmp=pow(a,2)+pow(b,2);
00634 tmp=sqrt(tmp);
00635 tmp=acos(a/tmp);
00636 return (fgUINT32) tmp;
00637 }
00638 static __inline__ fgUINT64 flgr_defop_argument_fgUINT64(fgUINT64 a,fgUINT64 b) {
00639 double tmp;
00640 tmp=pow(a,2)+pow(b,2);
00641 tmp=sqrt(tmp);
00642 tmp=acos(a/tmp);
00643 return (fgUINT64) tmp;
00644 }
00645 static __inline__ fgINT8 flgr_defop_argument_fgINT8(fgINT8 a,fgINT8 b) {
00646 double tmp;
00647 tmp=pow(a,2)+pow(b,2);
00648 tmp=sqrt(tmp);
00649 tmp=acos(a/tmp);
00650 return (fgINT8) tmp;
00651 }
00652 static __inline__ fgINT16 flgr_defop_argument_fgINT16(fgINT16 a,fgINT16 b) {
00653 double tmp;
00654 tmp=pow(a,2)+pow(b,2);
00655 tmp=sqrt(tmp);
00656 tmp=acos(a/tmp);
00657 return (fgINT16) tmp;
00658 }
00659 static __inline__ fgINT32 flgr_defop_argument_fgINT32(fgINT32 a,fgINT32 b) {
00660 double tmp;
00661 tmp=pow(a,2)+pow(b,2);
00662 tmp=sqrt(tmp);
00663 tmp=acos(a/tmp);
00664 return (fgINT32) tmp;
00665 }
00666 static __inline__ fgINT64 flgr_defop_argument_fgINT64(fgINT64 a,fgINT64 b) {
00667 double tmp;
00668 tmp=pow(a,2)+pow(b,2);
00669 tmp=sqrt(tmp);
00670 tmp=acos(a/tmp);
00671 return (fgINT64) tmp;
00672 }
00673 static __inline__ fgFLOAT32 flgr_defop_argument_fgFLOAT32(fgFLOAT32 a,fgFLOAT32 b) {
00674 double tmp;
00675 tmp=pow(a,2)+pow(b,2);
00676 tmp=sqrt(tmp);
00677 tmp=acos(a/tmp);
00678 return (fgFLOAT32) tmp;
00679 }
00680 static __inline__ fgFLOAT64 flgr_defop_argument_fgFLOAT64(fgFLOAT64 a,fgFLOAT64 b) {
00681 double tmp;
00682 tmp=pow(a,2)+pow(b,2);
00683 tmp=sqrt(tmp);
00684 tmp=acos(a/tmp);
00685 return (fgFLOAT64) tmp;
00686 }
00687
00688 static __inline__ fgFLOAT32 flgr_defop_atan2_fgFLOAT32(fgFLOAT32 a,fgFLOAT32 b) {
00689 return atan2f(a,b);
00690 }
00691 static __inline__ fgFLOAT64 flgr_defop_atan2_fgFLOAT64(fgFLOAT64 a,fgFLOAT64 b) {
00692 return atan2(a,b);
00693 }
00694
00695
00696 static __inline__ fgBIT flgr_defop_invert_fgBIT(fgBIT a) {
00697 return ~a;
00698 }
00699 static __inline__ fgUINT8 flgr_defop_invert_fgUINT8(fgUINT8 a) {
00700 return MAX_fgUINT8-a;
00701 }
00702 static __inline__ fgUINT16 flgr_defop_invert_fgUINT16(fgUINT16 a) {
00703 return MAX_fgUINT16-a;
00704 }
00705 static __inline__ fgUINT32 flgr_defop_invert_fgUINT32(fgUINT32 a) {
00706 return MAX_fgUINT32-a;
00707 }
00708 static __inline__ fgUINT64 flgr_defop_invert_fgUINT64(fgUINT64 a) {
00709 return MAX_fgUINT64-a;
00710 }
00711 static __inline__ fgINT8 flgr_defop_invert_fgINT8(fgINT8 a) {
00712 return -a;
00713 }
00714 static __inline__ fgINT16 flgr_defop_invert_fgINT16(fgINT16 a) {
00715 return -a;
00716 }
00717 static __inline__ fgINT32 flgr_defop_invert_fgINT32(fgINT32 a) {
00718 return -a;
00719 }
00720 static __inline__ fgINT64 flgr_defop_invert_fgINT64(fgINT64 a) {
00721 return -a;
00722 }
00723 static __inline__ fgFLOAT32 flgr_defop_invert_fgFLOAT32(fgFLOAT32 a) {
00724 return -a;
00725 }
00726 static __inline__ fgFLOAT64 flgr_defop_invert_fgFLOAT64(fgFLOAT64 a) {
00727 return -a;
00728 }
00729
00730
00731 static __inline__ fgINT8 flgr_defop_abs_fgINT8(fgINT8 a) {
00732 return abs(a);
00733 }
00734
00735 static __inline__ fgINT16 flgr_defop_abs_fgINT16(fgINT16 a) {
00736 return abs(a);
00737 }
00738
00739 static __inline__ fgINT32 flgr_defop_abs_fgINT32(fgINT32 a) {
00740 return abs(a);
00741 }
00742
00743 static __inline__ fgINT64 flgr_defop_abs_fgINT64(fgINT64 a) {
00744 return abs(a);
00745 }
00746
00747 static __inline__ fgFLOAT32 flgr_defop_abs_fgFLOAT32(fgFLOAT32 a) {
00748 return fabsf(a);
00749 }
00750
00751 static __inline__ fgFLOAT64 flgr_defop_abs_fgFLOAT64(fgFLOAT64 a) {
00752 return fabs(a);
00753 }
00754
00755
00756
00757 static __inline__ fgUINT8 flgr_defop_logb_fgUINT8(fgUINT8 a, fgFLOAT64 b) {
00758 return ((fgUINT8) ( log( (fgFLOAT64) (a)) / log(b) ));
00759 }
00760 static __inline__ fgUINT16 flgr_defop_logb_fgUINT16(fgUINT16 a, fgFLOAT64 b) {
00761 return ((fgUINT16) ( log( (fgFLOAT64) (a)) / log(b) ));
00762 }
00763 static __inline__ fgUINT32 flgr_defop_logb_fgUINT32(fgUINT32 a, fgFLOAT64 b) {
00764 return ((fgUINT32) ( log( (fgFLOAT64) (a)) / log(b) ));
00765 }
00766 static __inline__ fgUINT64 flgr_defop_logb_fgUINT64(fgUINT64 a, fgFLOAT64 b) {
00767 return ((fgUINT64) ( log( (fgFLOAT64) (a)) / log(b) ));
00768 }
00769 static __inline__ fgINT8 flgr_defop_logb_fgINT8(fgINT8 a, fgFLOAT64 b) {
00770 return ((fgINT8) ( log( (fgFLOAT64) (a)) / log(b) ));
00771 }
00772 static __inline__ fgINT16 flgr_defop_logb_fgINT16(fgINT16 a, fgFLOAT64 b) {
00773 return ((fgINT16) ( log( (fgFLOAT64) (a)) / log(b) ));
00774 }
00775 static __inline__ fgINT32 flgr_defop_logb_fgINT32(fgINT32 a, fgFLOAT64 b) {
00776 return ((fgINT32) ( log( (fgFLOAT64) (a)) / log(b) ));
00777 }
00778 static __inline__ fgINT64 flgr_defop_logb_fgINT64(fgINT64 a, fgFLOAT64 b) {
00779 return ((fgINT64) ( log( (fgFLOAT64) (a)) / log(b) ));
00780 }
00781 static __inline__ fgFLOAT32 flgr_defop_logb_fgFLOAT32(fgFLOAT32 a, fgFLOAT64 b) {
00782 return ((fgFLOAT32) ( log( (fgFLOAT64) (a)) / log(b) ));
00783 }
00784 static __inline__ fgFLOAT64 flgr_defop_logb_fgFLOAT64(fgFLOAT64 a, fgFLOAT64 b) {
00785 return ((fgFLOAT64) ( log( (fgFLOAT64) (a)) / log(b) ));
00786 }
00787
00788
00789 static __inline__ fgUINT8 flgr_defop_powb_fgUINT8(fgUINT8 a, fgFLOAT64 b) {
00790 return ((fgUINT8) ( pow( (fgFLOAT64) (a), b )));
00791 }
00792 static __inline__ fgUINT16 flgr_defop_powb_fgUINT16(fgUINT16 a, fgFLOAT64 b) {
00793 return ((fgUINT16) ( pow( (fgFLOAT64) (a), b )));
00794 }
00795 static __inline__ fgUINT32 flgr_defop_powb_fgUINT32(fgUINT32 a, fgFLOAT64 b) {
00796 return ((fgUINT32) ( pow( (fgFLOAT64) (a), b )));
00797 }
00798 static __inline__ fgUINT64 flgr_defop_powb_fgUINT64(fgUINT64 a, fgFLOAT64 b) {
00799 return ((fgUINT64) ( pow( (fgFLOAT64) (a), b )));
00800 }
00801 static __inline__ fgINT8 flgr_defop_powb_fgINT8(fgINT8 a, fgFLOAT64 b) {
00802 return ((fgINT8) ( pow( (fgFLOAT64) (a), b )));
00803 }
00804 static __inline__ fgINT16 flgr_defop_powb_fgINT16(fgINT16 a, fgFLOAT64 b) {
00805 return ((fgINT16) ( pow( (fgFLOAT64) (a), b )));
00806 }
00807 static __inline__ fgINT32 flgr_defop_powb_fgINT32(fgINT32 a, fgFLOAT64 b) {
00808 return ((fgINT32) ( pow( (fgFLOAT64) (a), b )));
00809 }
00810 static __inline__ fgINT64 flgr_defop_powb_fgINT64(fgINT64 a, fgFLOAT64 b) {
00811 return ((fgINT64) ( pow( (fgFLOAT64) (a), b )));
00812 }
00813 static __inline__ fgFLOAT32 flgr_defop_powb_fgFLOAT32(fgFLOAT32 a, fgFLOAT64 b) {
00814 return ((fgFLOAT32) ( pow( (fgFLOAT64) (a), b )));
00815 }
00816 static __inline__ fgFLOAT64 flgr_defop_powb_fgFLOAT64(fgFLOAT64 a, fgFLOAT64 b) {
00817 return ((fgFLOAT64) ( pow( (fgFLOAT64) (a), b )));
00818 }
00819
00820
00821
00822 static __inline__ fgUINT8 flgr_defop_square_fgUINT8(fgUINT8 a) {
00823 return a*a;
00824 }
00825 static __inline__ fgUINT16 flgr_defop_square_fgUINT16(fgUINT16 a) {
00826 return a*a;
00827 }
00828 static __inline__ fgUINT32 flgr_defop_square_fgUINT32(fgUINT32 a) {
00829 return a*a;
00830 }
00831 static __inline__ fgUINT64 flgr_defop_square_fgUINT64(fgUINT64 a) {
00832 return a*a;
00833 }
00834 static __inline__ fgINT8 flgr_defop_square_fgINT8(fgINT8 a) {
00835 return a*a;
00836 }
00837 static __inline__ fgINT16 flgr_defop_square_fgINT16(fgINT16 a) {
00838 return a*a;
00839 }
00840 static __inline__ fgINT32 flgr_defop_square_fgINT32(fgINT32 a) {
00841 return a*a;
00842 }
00843 static __inline__ fgINT64 flgr_defop_square_fgINT64(fgINT64 a) {
00844 return a*a;
00845 }
00846 static __inline__ fgFLOAT32 flgr_defop_square_fgFLOAT32(fgFLOAT32 a) {
00847 return a*a;
00848 }
00849 static __inline__ fgFLOAT64 flgr_defop_square_fgFLOAT64(fgFLOAT64 a) {
00850 return a*a;
00851 }
00852
00853
00854 static __inline__ fgUINT8 flgr_defop_sqrt_fgUINT8(fgUINT8 a) {
00855 return (fgUINT8) sqrt(a);
00856 }
00857 static __inline__ fgUINT16 flgr_defop_sqrt_fgUINT16(fgUINT16 a) {
00858 return (fgUINT16) sqrt(a);
00859 }
00860 static __inline__ fgUINT32 flgr_defop_sqrt_fgUINT32(fgUINT32 a) {
00861 return (fgUINT32) sqrt(a);
00862 }
00863 static __inline__ fgUINT64 flgr_defop_sqrt_fgUINT64(fgUINT64 a) {
00864 return (fgUINT64) sqrt(a);
00865 }
00866 static __inline__ fgINT8 flgr_defop_sqrt_fgINT8(fgINT8 a) {
00867 return (fgINT8) sqrt(a);
00868 }
00869 static __inline__ fgINT16 flgr_defop_sqrt_fgINT16(fgINT16 a) {
00870 return (fgINT16) sqrt(a);
00871 }
00872 static __inline__ fgINT32 flgr_defop_sqrt_fgINT32(fgINT32 a) {
00873 return (fgINT32) sqrt(a);
00874 }
00875 static __inline__ fgINT64 flgr_defop_sqrt_fgINT64(fgINT64 a) {
00876 return (fgINT64) sqrt(a);
00877 }
00878 static __inline__ fgFLOAT32 flgr_defop_sqrt_fgFLOAT32(fgFLOAT32 a) {
00879 return sqrtf(a);
00880 }
00881 static __inline__ fgFLOAT64 flgr_defop_sqrt_fgFLOAT64(fgFLOAT64 a) {
00882 return sqrt(a);
00883 }
00884
00885
00886 static __inline__ fgFLOAT32 flgr_defop_cos_fgFLOAT32(fgFLOAT32 a) {
00887 return cosf(a);
00888 }
00889 static __inline__ fgFLOAT64 flgr_defop_cos_fgFLOAT64(fgFLOAT64 a) {
00890 return cos(a);
00891 }
00892
00893 static __inline__ fgFLOAT32 flgr_defop_sin_fgFLOAT32(fgFLOAT32 a) {
00894 return sinf(a);
00895 }
00896 static __inline__ fgFLOAT64 flgr_defop_sin_fgFLOAT64(fgFLOAT64 a) {
00897 return sin(a);
00898 }
00899
00900 static __inline__ fgFLOAT32 flgr_defop_tan_fgFLOAT32(fgFLOAT32 a) {
00901 return tanf(a);
00902 }
00903 static __inline__ fgFLOAT64 flgr_defop_tan_fgFLOAT64(fgFLOAT64 a) {
00904 return tan(a);
00905 }
00906
00907 static __inline__ fgFLOAT32 flgr_defop_acos_fgFLOAT32(fgFLOAT32 a) {
00908 return acosf(a);
00909 }
00910 static __inline__ fgFLOAT64 flgr_defop_acos_fgFLOAT64(fgFLOAT64 a) {
00911 return acos(a);
00912 }
00913
00914 static __inline__ fgFLOAT32 flgr_defop_asin_fgFLOAT32(fgFLOAT32 a) {
00915 return asinf(a);
00916 }
00917 static __inline__ fgFLOAT64 flgr_defop_asin_fgFLOAT64(fgFLOAT64 a) {
00918 return asin(a);
00919 }
00920
00921 static __inline__ fgFLOAT32 flgr_defop_atan_fgFLOAT32(fgFLOAT32 a) {
00922 return atanf(a);
00923 }
00924 static __inline__ fgFLOAT64 flgr_defop_atan_fgFLOAT64(fgFLOAT64 a) {
00925 return atan(a);
00926 }
00927
00928
00929 static __inline__ fgFLOAT32 flgr_defop_floor_fgFLOAT32(fgFLOAT32 a) {
00930 return floorf(a);
00931 }
00932 static __inline__ fgFLOAT64 flgr_defop_floor_fgFLOAT64(fgFLOAT64 a) {
00933 return floor(a);
00934 }
00935
00936
00937 static __inline__ fgFLOAT32 flgr_defop_ceil_fgFLOAT32(fgFLOAT32 a) {
00938 return ceilf(a);
00939 }
00940 static __inline__ fgFLOAT64 flgr_defop_ceil_fgFLOAT64(fgFLOAT64 a) {
00941 return ceil(a);
00942 }
00943
00944
00945 static __inline__ fgBIT flgr_defop_ne_fgBIT(fgBIT a, fgBIT b) {
00946 return (a!=b) ? MAX_fgBIT : 0;
00947 }
00948 static __inline__ fgUINT8 flgr_defop_ne_fgUINT8(fgUINT8 a, fgUINT8 b) {
00949 return (a!=b) ? MAX_fgUINT8 : 0;
00950 }
00951 static __inline__ fgUINT16 flgr_defop_ne_fgUINT16(fgUINT16 a, fgUINT16 b) {
00952 return (a!=b) ? MAX_fgUINT16 : 0;
00953 }
00954 static __inline__ fgUINT32 flgr_defop_ne_fgUINT32(fgUINT32 a, fgUINT32 b) {
00955 return (a!=b) ? MAX_fgUINT32 : 0;
00956 }
00957 static __inline__ fgUINT64 flgr_defop_ne_fgUINT64(fgUINT64 a, fgUINT64 b) {
00958 return (a!=b) ? MAX_fgUINT64 : 0;
00959 }
00960 static __inline__ fgINT8 flgr_defop_ne_fgINT8(fgINT8 a, fgINT8 b) {
00961 return (a!=b) ? MAX_fgINT8 : 0;
00962 }
00963 static __inline__ fgINT16 flgr_defop_ne_fgINT16(fgINT16 a, fgINT16 b) {
00964 return (a!=b) ? MAX_fgINT16 : 0;
00965 }
00966 static __inline__ fgINT32 flgr_defop_ne_fgINT32(fgINT32 a, fgINT32 b) {
00967 return (a!=b) ? MAX_fgINT32 : 0;
00968 }
00969 static __inline__ fgINT64 flgr_defop_ne_fgINT64(fgINT64 a, fgINT64 b) {
00970 return (a!=b) ? MAX_fgINT64 : 0;
00971 }
00972 static __inline__ fgFLOAT32 flgr_defop_ne_fgFLOAT32(fgFLOAT32 a, fgFLOAT32 b) {
00973 return (a!=b) ? MAX_fgFLOAT32 : 0;
00974 }
00975 static __inline__ fgFLOAT64 flgr_defop_ne_fgFLOAT64(fgFLOAT64 a, fgFLOAT64 b) {
00976 return (a!=b) ? MAX_fgFLOAT64 : 0;
00977 }
00978
00979 static __inline__ fgBIT flgr_defop_eq_fgBIT(fgBIT a, fgBIT b) {
00980 return (a==b) ? MAX_fgBIT : 0;
00981 }
00982 static __inline__ fgUINT8 flgr_defop_eq_fgUINT8(fgUINT8 a, fgUINT8 b) {
00983 return (a==b) ? MAX_fgUINT8 : 0;
00984 }
00985 static __inline__ fgUINT16 flgr_defop_eq_fgUINT16(fgUINT16 a, fgUINT16 b) {
00986 return (a==b) ? MAX_fgUINT16 : 0;
00987 }
00988 static __inline__ fgUINT32 flgr_defop_eq_fgUINT32(fgUINT32 a, fgUINT32 b) {
00989 return (a==b) ? MAX_fgUINT32 : 0;
00990 }
00991 static __inline__ fgUINT64 flgr_defop_eq_fgUINT64(fgUINT64 a, fgUINT64 b) {
00992 return (a==b) ? MAX_fgUINT64 : 0;
00993 }
00994 static __inline__ fgINT8 flgr_defop_eq_fgINT8(fgINT8 a, fgINT8 b) {
00995 return (a==b) ? MAX_fgINT8 : 0;
00996 }
00997 static __inline__ fgINT16 flgr_defop_eq_fgINT16(fgINT16 a, fgINT16 b) {
00998 return (a==b) ? MAX_fgINT16 : 0;
00999 }
01000 static __inline__ fgINT32 flgr_defop_eq_fgINT32(fgINT32 a, fgINT32 b) {
01001 return (a==b) ? MAX_fgINT32 : 0;
01002 }
01003 static __inline__ fgINT64 flgr_defop_eq_fgINT64(fgINT64 a, fgINT64 b) {
01004 return (a==b) ? MAX_fgINT64 : 0;
01005 }
01006 static __inline__ fgFLOAT32 flgr_defop_eq_fgFLOAT32(fgFLOAT32 a, fgFLOAT32 b) {
01007 return (a==b) ? MAX_fgFLOAT32 : 0;
01008 }
01009 static __inline__ fgFLOAT64 flgr_defop_eq_fgFLOAT64(fgFLOAT64 a, fgFLOAT64 b) {
01010 return (a==b) ? MAX_fgFLOAT64 : 0;
01011 }
01012
01013 static __inline__ fgBIT flgr_defop_gt_fgBIT(fgBIT a, fgBIT b) {
01014 return (a>b) ? MAX_fgBIT : 0;
01015 }
01016 static __inline__ fgUINT8 flgr_defop_gt_fgUINT8(fgUINT8 a, fgUINT8 b) {
01017 return (a>b) ? MAX_fgUINT8 : 0;
01018 }
01019 static __inline__ fgUINT16 flgr_defop_gt_fgUINT16(fgUINT16 a, fgUINT16 b) {
01020 return (a>b) ? MAX_fgUINT16 : 0;
01021 }
01022 static __inline__ fgUINT32 flgr_defop_gt_fgUINT32(fgUINT32 a, fgUINT32 b) {
01023 return (a>b) ? MAX_fgUINT32 : 0;
01024 }
01025 static __inline__ fgUINT64 flgr_defop_gt_fgUINT64(fgUINT64 a, fgUINT64 b) {
01026 return (a>b) ? MAX_fgUINT64 : 0;
01027 }
01028 static __inline__ fgINT8 flgr_defop_gt_fgINT8(fgINT8 a, fgINT8 b) {
01029 return (a>b) ? MAX_fgINT8 : 0;
01030 }
01031 static __inline__ fgINT16 flgr_defop_gt_fgINT16(fgINT16 a, fgINT16 b) {
01032 return (a>b) ? MAX_fgINT16 : 0;
01033 }
01034 static __inline__ fgINT32 flgr_defop_gt_fgINT32(fgINT32 a, fgINT32 b) {
01035 return (a>b) ? MAX_fgINT32 : 0;
01036 }
01037 static __inline__ fgINT64 flgr_defop_gt_fgINT64(fgINT64 a, fgINT64 b) {
01038 return (a>b) ? MAX_fgINT64 : 0;
01039 }
01040 static __inline__ fgFLOAT32 flgr_defop_gt_fgFLOAT32(fgFLOAT32 a, fgFLOAT32 b) {
01041 return (a>b) ? MAX_fgFLOAT32 : 0;
01042 }
01043 static __inline__ fgFLOAT64 flgr_defop_gt_fgFLOAT64(fgFLOAT64 a, fgFLOAT64 b) {
01044 return (a>b) ? MAX_fgFLOAT64 : 0;
01045 }
01046
01047 static __inline__ fgBIT flgr_defop_lt_fgBIT(fgBIT a, fgBIT b) {
01048 return (a<b) ? MAX_fgBIT : 0;
01049 }
01050 static __inline__ fgUINT8 flgr_defop_lt_fgUINT8(fgUINT8 a, fgUINT8 b) {
01051 return (a<b) ? MAX_fgUINT8 : 0;
01052 }
01053 static __inline__ fgUINT16 flgr_defop_lt_fgUINT16(fgUINT16 a, fgUINT16 b) {
01054 return (a<b) ? MAX_fgUINT16 : 0;
01055 }
01056 static __inline__ fgUINT32 flgr_defop_lt_fgUINT32(fgUINT32 a, fgUINT32 b) {
01057 return (a<b) ? MAX_fgUINT32 : 0;
01058 }
01059 static __inline__ fgUINT64 flgr_defop_lt_fgUINT64(fgUINT64 a, fgUINT64 b) {
01060 return (a<b) ? MAX_fgUINT64 : 0;
01061 }
01062 static __inline__ fgINT8 flgr_defop_lt_fgINT8(fgINT8 a, fgINT8 b) {
01063 return (a<b) ? MAX_fgINT8 : 0;
01064 }
01065 static __inline__ fgINT16 flgr_defop_lt_fgINT16(fgINT16 a, fgINT16 b) {
01066 return (a<b) ? MAX_fgINT16 : 0;
01067 }
01068 static __inline__ fgINT32 flgr_defop_lt_fgINT32(fgINT32 a, fgINT32 b) {
01069 return (a<b) ? MAX_fgINT32 : 0;
01070 }
01071 static __inline__ fgINT64 flgr_defop_lt_fgINT64(fgINT64 a, fgINT64 b) {
01072 return (a<b) ? MAX_fgINT64 : 0;
01073 }
01074 static __inline__ fgFLOAT32 flgr_defop_lt_fgFLOAT32(fgFLOAT32 a, fgFLOAT32 b) {
01075 return (a<b) ? MAX_fgFLOAT32 : 0;
01076 }
01077 static __inline__ fgFLOAT64 flgr_defop_lt_fgFLOAT64(fgFLOAT64 a, fgFLOAT64 b) {
01078 return (a<b) ? MAX_fgFLOAT64 : 0;
01079 }
01080
01081 static __inline__ fgBIT flgr_defop_le_fgBIT(fgBIT a, fgBIT b) {
01082 return (a<=b) ? MAX_fgBIT : 0;
01083 }
01084 static __inline__ fgUINT8 flgr_defop_le_fgUINT8(fgUINT8 a, fgUINT8 b) {
01085 return (a<=b) ? MAX_fgUINT8 : 0;
01086 }
01087 static __inline__ fgUINT16 flgr_defop_le_fgUINT16(fgUINT16 a, fgUINT16 b) {
01088 return (a<=b) ? MAX_fgUINT16 : 0;
01089 }
01090 static __inline__ fgUINT32 flgr_defop_le_fgUINT32(fgUINT32 a, fgUINT32 b) {
01091 return (a<=b) ? MAX_fgUINT32 : 0;
01092 }
01093 static __inline__ fgUINT64 flgr_defop_le_fgUINT64(fgUINT64 a, fgUINT64 b) {
01094 return (a<=b) ? MAX_fgUINT64 : 0;
01095 }
01096 static __inline__ fgINT8 flgr_defop_le_fgINT8(fgINT8 a, fgINT8 b) {
01097 return (a<=b) ? MAX_fgINT8 : 0;
01098 }
01099 static __inline__ fgINT16 flgr_defop_le_fgINT16(fgINT16 a, fgINT16 b) {
01100 return (a<=b) ? MAX_fgINT16 : 0;
01101 }
01102 static __inline__ fgINT32 flgr_defop_le_fgINT32(fgINT32 a, fgINT32 b) {
01103 return (a<=b) ? MAX_fgINT32 : 0;
01104 }
01105 static __inline__ fgINT64 flgr_defop_le_fgINT64(fgINT64 a, fgINT64 b) {
01106 return (a<=b) ? MAX_fgINT64 : 0;
01107 }
01108 static __inline__ fgFLOAT32 flgr_defop_le_fgFLOAT32(fgFLOAT32 a, fgFLOAT32 b) {
01109 return (a<=b) ? MAX_fgFLOAT32 : 0;
01110 }
01111 static __inline__ fgFLOAT64 flgr_defop_le_fgFLOAT64(fgFLOAT64 a, fgFLOAT64 b) {
01112 return (a<=b) ? MAX_fgFLOAT64 : 0;
01113 }
01114
01115 static __inline__ fgBIT flgr_defop_ge_fgBIT(fgBIT a, fgBIT b) {
01116 return (a>=b) ? MAX_fgBIT : 0;
01117 }
01118 static __inline__ fgUINT8 flgr_defop_ge_fgUINT8(fgUINT8 a, fgUINT8 b) {
01119 return (a>=b) ? MAX_fgUINT8 : 0;
01120 }
01121 static __inline__ fgUINT16 flgr_defop_ge_fgUINT16(fgUINT16 a, fgUINT16 b) {
01122 return (a>=b) ? MAX_fgUINT16 : 0;
01123 }
01124 static __inline__ fgUINT32 flgr_defop_ge_fgUINT32(fgUINT32 a, fgUINT32 b) {
01125 return (a>=b) ? MAX_fgUINT32 : 0;
01126 }
01127 static __inline__ fgUINT64 flgr_defop_ge_fgUINT64(fgUINT64 a, fgUINT64 b) {
01128 return (a>=b) ? MAX_fgUINT64 : 0;
01129 }
01130 static __inline__ fgINT8 flgr_defop_ge_fgINT8(fgINT8 a, fgINT8 b) {
01131 return (a>=b) ? MAX_fgINT8 : 0;
01132 }
01133 static __inline__ fgINT16 flgr_defop_ge_fgINT16(fgINT16 a, fgINT16 b) {
01134 return (a>=b) ? MAX_fgINT16 : 0;
01135 }
01136 static __inline__ fgINT32 flgr_defop_ge_fgINT32(fgINT32 a, fgINT32 b) {
01137 return (a>=b) ? MAX_fgINT32 : 0;
01138 }
01139 static __inline__ fgINT64 flgr_defop_ge_fgINT64(fgINT64 a, fgINT64 b) {
01140 return (a>=b) ? MAX_fgINT64 : 0;
01141 }
01142 static __inline__ fgFLOAT32 flgr_defop_ge_fgFLOAT32(fgFLOAT32 a, fgFLOAT32 b) {
01143 return (a>=b) ? MAX_fgFLOAT32 : 0;
01144 }
01145 static __inline__ fgFLOAT64 flgr_defop_ge_fgFLOAT64(fgFLOAT64 a, fgFLOAT64 b) {
01146 return (a>=b) ? MAX_fgFLOAT64 : 0;
01147 }
01148
01149
01150 static __inline__ fgBIT flgr_defop_cmove_fgBIT(fgBIT a, fgBIT b, fgBIT c) {
01151 return ((a!=0) ? b : c);
01152 }
01153 static __inline__ fgUINT8 flgr_defop_cmove_fgUINT8(fgUINT8 a, fgUINT8 b, fgUINT8 c) {
01154 return ((a!=0) ? b : c);
01155 }
01156 static __inline__ fgUINT16 flgr_defop_cmove_fgUINT16(fgUINT16 a, fgUINT16 b, fgUINT16 c) {
01157 return ((a!=0) ? b : c);
01158 }
01159 static __inline__ fgUINT32 flgr_defop_cmove_fgUINT32(fgUINT32 a, fgUINT32 b, fgUINT32 c) {
01160 return ((a!=0) ? b : c);
01161 }
01162 static __inline__ fgUINT64 flgr_defop_cmove_fgUINT64(fgUINT64 a, fgUINT64 b, fgUINT64 c) {
01163 return ((a!=0) ? b : c);
01164 }
01165 static __inline__ fgINT8 flgr_defop_cmove_fgINT8(fgINT8 a, fgINT8 b, fgINT8 c) {
01166 return ((a!=0) ? b : c);
01167 }
01168 static __inline__ fgINT16 flgr_defop_cmove_fgINT16(fgINT16 a, fgINT16 b, fgINT16 c) {
01169 return ((a!=0) ? b : c);
01170 }
01171 static __inline__ fgINT32 flgr_defop_cmove_fgINT32(fgINT32 a, fgINT32 b, fgINT32 c) {
01172 return ((a!=0) ? b : c);
01173 }
01174 static __inline__ fgINT64 flgr_defop_cmove_fgINT64(fgINT64 a, fgINT64 b, fgINT64 c) {
01175 return ((a!=0) ? b : c);
01176 }
01177 static __inline__ fgFLOAT32 flgr_defop_cmove_fgFLOAT32(fgFLOAT32 a, fgFLOAT32 b, fgFLOAT32 c) {
01178 return ((a!=0) ? b : c);
01179 }
01180 static __inline__ fgFLOAT64 flgr_defop_cmove_fgFLOAT64(fgFLOAT64 a, fgFLOAT64 b, fgFLOAT64 c) {
01181 return ((a!=0) ? b : c);
01182 }
01183
01184
01185
01186
01187
01188
01189 #endif
01190
01191 #ifdef __cplusplus
01192 }
01193 #endif