First public contribution.
2 * LIBOIL - Library of Optimized Inner Loops
3 * Copyright (c) 2001,2003,2004 David A. Schleef <ds@schleef.org>
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
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.
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.
27 //Portions Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
32 #include <liboilfunction.h>
33 #include <liboiltest.h>
34 #include <liboilrandom.h>
42 * SECTION:liboilfuncs-conv
43 * @title: Type Conversion
44 * @short_description: Type conversion
46 * The functions in this section perform type conversion.
48 * The <i>convert</i> functions convert value from the source type to
49 * the destination type. Conversion of values outside the
50 * destination range are saturated to the destination range.
52 * The <i>scaleconv</i> functions multiply the source values by a
53 * constant factor before converting to the destination type. Conversion
54 * of values outside the destination range are clamped to the
57 * Conversion of values from floating point types to integer types
58 * is done using a round-to-nearest policy. Rounding of half-integers
59 * is undefined and may vary between implementations.
64 convert_float_test (OilTest *test)
70 void *data = oil_test_get_source_data (test, OIL_ARG_SRC1);
72 n = test->params[OIL_ARG_SRC1].post_n;
74 switch(test->params[OIL_ARG_DEST1].type) {
76 min = oil_type_min_s8;
77 max = oil_type_max_s8;
80 min = oil_type_min_u8;
81 max = oil_type_max_u8;
84 min = oil_type_min_s16;
85 max = oil_type_max_s16;
88 min = oil_type_min_u16;
89 max = oil_type_max_u16;
92 min = oil_type_min_s32;
93 max = oil_type_max_s32;
96 min = oil_type_min_u32;
97 max = oil_type_max_u32;
103 switch (test->params[OIL_ARG_SRC1].type) {
107 x = oil_rand_u8() & 0x1;
110 ((float *)data)[i] = oil_rand_f32() * (max - min) + min;
114 ((float *)data)[i] = (oil_rand_f32() - 0.5) * 10;
116 ((float *)data)[i] = oil_rand_f32() * 10;
124 ((double *)data)[i] = oil_rand_f64() * (max - min) + min;
133 #define CONVERT_DEFINE_NONE_REF(desttype,srctype) \
134 static void convert_ ## desttype ## _ ## srctype ## _ref ( \
135 oil_type_ ## desttype *dest, \
136 oil_type_ ## srctype *src, \
140 oil_type_ ## srctype x; \
146 OIL_DEFINE_CLASS(convert_ ## desttype ## _ ## srctype, \
147 "oil_type_" #desttype " *dest, " \
148 "oil_type_" #srctype " *src, " \
150 OIL_DEFINE_IMPL_REF(convert_ ## desttype ## _ ## srctype ## _ref, \
151 convert_ ## desttype ## _ ## srctype)
153 #define CONVERT_DEFINE_BOTH_REF(desttype,srctype) \
154 static void convert_ ## desttype ## _ ## srctype ## _ref ( \
155 oil_type_ ## desttype *dest, \
156 oil_type_ ## srctype *src, \
160 oil_type_ ## srctype x; \
163 if(x<oil_type_min_ ## desttype) x=oil_type_min_ ## desttype; \
164 if(x>oil_type_max_ ## desttype) x=oil_type_max_ ## desttype; \
168 OIL_DEFINE_CLASS(convert_ ## desttype ## _ ## srctype, \
169 "oil_type_" #desttype " *dest, " \
170 "oil_type_" #srctype " *src, " \
172 OIL_DEFINE_IMPL_REF(convert_ ## desttype ## _ ## srctype ## _ref, \
173 convert_ ## desttype ## _ ## srctype)
175 #define CONVERT_DEFINE_UPPER_REF(desttype,srctype) \
176 static void convert_ ## desttype ## _ ## srctype ## _ref ( \
177 oil_type_ ## desttype *dest, \
178 oil_type_ ## srctype *src, \
182 oil_type_ ## srctype x; \
185 if(x>oil_type_max_ ## desttype) x=oil_type_max_ ## desttype; \
189 OIL_DEFINE_CLASS(convert_ ## desttype ## _ ## srctype, \
190 "oil_type_" #desttype " *dest, " \
191 "oil_type_" #srctype " *src, " \
193 OIL_DEFINE_IMPL_REF(convert_ ## desttype ## _ ## srctype ## _ref, \
194 convert_ ## desttype ## _ ## srctype)
196 #define CONVERT_DEFINE_LOWER_REF(desttype,srctype) \
197 static void convert_ ## desttype ## _ ## srctype ## _ref ( \
198 oil_type_ ## desttype *dest, \
199 oil_type_ ## srctype *src, \
203 oil_type_ ## srctype x; \
206 if(x<oil_type_min_ ## desttype) x=oil_type_min_ ## desttype; \
210 OIL_DEFINE_CLASS(convert_ ## desttype ## _ ## srctype, \
211 "oil_type_" #desttype " *dest, " \
212 "oil_type_" #srctype " *src, " \
214 OIL_DEFINE_IMPL_REF(convert_ ## desttype ## _ ## srctype ## _ref, \
215 convert_ ## desttype ## _ ## srctype)
217 #define CONVERT_DEFINE_FLOAT_REF(desttype,srctype) \
218 static void convert_ ## desttype ## _ ## srctype ## _ref ( \
219 oil_type_ ## desttype *dest, \
220 oil_type_ ## srctype *src, \
224 oil_type_ ## srctype x; \
227 if(x<oil_type_min_ ## desttype) x=oil_type_min_ ## desttype; \
228 if(x>oil_type_max_ ## desttype) x=oil_type_max_ ## desttype; \
232 OIL_DEFINE_CLASS_FULL(convert_ ## desttype ## _ ## srctype, \
233 "oil_type_" #desttype " *dest, " \
234 "oil_type_" #srctype " *src, " \
235 "int n", convert_float_test); \
236 OIL_DEFINE_IMPL_REF(convert_ ## desttype ## _ ## srctype ## _ref, \
237 convert_ ## desttype ## _ ## srctype)
240 CONVERT_DEFINE_NONE_REF(s16,s8);
243 OilFunctionImpl* __oil_function_impl_convert_s16_s8_ref() {
244 return &_oil_function_impl_convert_s16_s8_ref;
248 CONVERT_DEFINE_NONE_REF(s16,u8);
251 OilFunctionImpl* __oil_function_impl_convert_s16_u8_ref() {
252 return &_oil_function_impl_convert_s16_u8_ref;
256 CONVERT_DEFINE_NONE_REF(s32,s8);
259 OilFunctionImpl* __oil_function_impl_convert_s32_s8_ref() {
260 return &_oil_function_impl_convert_s32_s8_ref;
264 CONVERT_DEFINE_NONE_REF(s32,u8);
267 OilFunctionImpl* __oil_function_impl_convert_s32_u8_ref() {
268 return &_oil_function_impl_convert_s32_u8_ref;
272 CONVERT_DEFINE_NONE_REF(s32,s16);
275 OilFunctionImpl* __oil_function_impl_convert_s32_s16_ref() {
276 return &_oil_function_impl_convert_s32_s16_ref;
280 CONVERT_DEFINE_NONE_REF(s32,u16);
283 OilFunctionImpl* __oil_function_impl_convert_s32_u16_ref() {
284 return &_oil_function_impl_convert_s32_u16_ref;
288 CONVERT_DEFINE_NONE_REF(u16,u8);
291 OilFunctionImpl* __oil_function_impl_convert_u16_u8_ref() {
292 return &_oil_function_impl_convert_u16_u8_ref;
296 CONVERT_DEFINE_NONE_REF(u32,u8);
299 OilFunctionImpl* __oil_function_impl_convert_u32_u8_ref() {
300 return &_oil_function_impl_convert_u32_u8_ref;
304 CONVERT_DEFINE_NONE_REF(u32,u16);
307 OilFunctionImpl* __oil_function_impl_convert_u32_u16_ref() {
308 return &_oil_function_impl_convert_u32_u16_ref;
313 CONVERT_DEFINE_UPPER_REF(s8,u8);
316 OilFunctionImpl* __oil_function_impl_convert_s8_u8_ref() {
317 return &_oil_function_impl_convert_s8_u8_ref;
321 CONVERT_DEFINE_UPPER_REF(s8,u16);
324 OilFunctionImpl* __oil_function_impl_convert_s8_u16_ref() {
325 return &_oil_function_impl_convert_s8_u16_ref;
329 CONVERT_DEFINE_UPPER_REF(s8,u32);
332 OilFunctionImpl* __oil_function_impl_convert_s8_u32_ref() {
333 return &_oil_function_impl_convert_s8_u32_ref;
337 CONVERT_DEFINE_UPPER_REF(u8,u32);
340 OilFunctionImpl* __oil_function_impl_convert_u8_u32_ref() {
341 return &_oil_function_impl_convert_u8_u32_ref;
345 CONVERT_DEFINE_UPPER_REF(u8,u16);
348 OilFunctionImpl* __oil_function_impl_convert_u8_u16_ref() {
349 return &_oil_function_impl_convert_u8_u16_ref;
353 CONVERT_DEFINE_UPPER_REF(s16,u16);
356 OilFunctionImpl* __oil_function_impl_convert_s16_u16_ref() {
357 return &_oil_function_impl_convert_s16_u16_ref;
361 CONVERT_DEFINE_UPPER_REF(s16,u32);
364 OilFunctionImpl* __oil_function_impl_convert_s16_u32_ref() {
365 return &_oil_function_impl_convert_s16_u32_ref;
369 CONVERT_DEFINE_UPPER_REF(s32,u32);
372 OilFunctionImpl* __oil_function_impl_convert_s32_u32_ref() {
373 return &_oil_function_impl_convert_s32_u32_ref;
377 CONVERT_DEFINE_UPPER_REF(u16,u32);
380 OilFunctionImpl* __oil_function_impl_convert_u16_u32_ref() {
381 return &_oil_function_impl_convert_u16_u32_ref;
386 CONVERT_DEFINE_BOTH_REF(s8,s16);
389 OilFunctionImpl* __oil_function_impl_convert_s8_s16_ref() {
390 return &_oil_function_impl_convert_s8_s16_ref;
394 CONVERT_DEFINE_BOTH_REF(s8,s32);
397 OilFunctionImpl* __oil_function_impl_convert_s8_s32_ref() {
398 return &_oil_function_impl_convert_s8_s32_ref;
402 CONVERT_DEFINE_BOTH_REF(u8,s16);
405 OilFunctionImpl* __oil_function_impl_convert_u8_s16_ref() {
406 return &_oil_function_impl_convert_u8_s16_ref;
410 CONVERT_DEFINE_BOTH_REF(u8,s32);
413 OilFunctionImpl* __oil_function_impl_convert_u8_s32_ref() {
414 return &_oil_function_impl_convert_u8_s32_ref;
418 CONVERT_DEFINE_BOTH_REF(s16,s32);
421 OilFunctionImpl* __oil_function_impl_convert_s16_s32_ref() {
422 return &_oil_function_impl_convert_s16_s32_ref;
426 CONVERT_DEFINE_BOTH_REF(u16,s32);
429 OilFunctionImpl* __oil_function_impl_convert_u16_s32_ref() {
430 return &_oil_function_impl_convert_u16_s32_ref;
435 CONVERT_DEFINE_LOWER_REF(u8,s8);
438 OilFunctionImpl* __oil_function_impl_convert_u8_s8_ref() {
439 return &_oil_function_impl_convert_u8_s8_ref;
443 CONVERT_DEFINE_LOWER_REF(u16,s16);
446 OilFunctionImpl* __oil_function_impl_convert_u16_s16_ref() {
447 return &_oil_function_impl_convert_u16_s16_ref;
451 CONVERT_DEFINE_LOWER_REF(u32,s32);
454 OilFunctionImpl* __oil_function_impl_convert_u32_s32_ref() {
455 return &_oil_function_impl_convert_u32_s32_ref;
459 /* clip both, float */
460 CONVERT_DEFINE_FLOAT_REF(s8,f32);
463 OilFunctionImpl* __oil_function_impl_convert_s8_f32_ref() {
464 return &_oil_function_impl_convert_s8_f32_ref;
468 CONVERT_DEFINE_FLOAT_REF(s8,f64);
471 OilFunctionImpl* __oil_function_impl_convert_s8_f64_ref() {
472 return &_oil_function_impl_convert_s8_f64_ref;
476 CONVERT_DEFINE_FLOAT_REF(u8,f32);
479 OilFunctionImpl* __oil_function_impl_convert_u8_f32_ref() {
480 return &_oil_function_impl_convert_u8_f32_ref;
484 CONVERT_DEFINE_FLOAT_REF(u8,f64);
487 OilFunctionImpl* __oil_function_impl_convert_u8_f64_ref() {
488 return &_oil_function_impl_convert_u8_f64_ref;
492 CONVERT_DEFINE_FLOAT_REF(s16,f32);
495 OilFunctionImpl* __oil_function_impl_convert_s16_f32_ref() {
496 return &_oil_function_impl_convert_s16_f32_ref;
500 CONVERT_DEFINE_FLOAT_REF(s16,f64);
503 OilFunctionImpl* __oil_function_impl_convert_s16_f64_ref() {
504 return &_oil_function_impl_convert_s16_f64_ref;
508 CONVERT_DEFINE_FLOAT_REF(u16,f32);
511 OilFunctionImpl* __oil_function_impl_convert_u16_f32_ref() {
512 return &_oil_function_impl_convert_u16_f32_ref;
516 CONVERT_DEFINE_FLOAT_REF(u16,f64);
519 OilFunctionImpl* __oil_function_impl_convert_u16_f64_ref() {
520 return &_oil_function_impl_convert_u16_f64_ref;
524 CONVERT_DEFINE_FLOAT_REF(s32,f64);
527 OilFunctionImpl* __oil_function_impl_convert_s32_f64_ref() {
528 return &_oil_function_impl_convert_s32_f64_ref;
532 CONVERT_DEFINE_FLOAT_REF(u32,f64);
535 OilFunctionImpl* __oil_function_impl_convert_u32_f64_ref() {
536 return &_oil_function_impl_convert_u32_f64_ref;
543 * oil_convert_f32_f64:
548 * Converts elements in from the source type
549 * to the destination type and places the result in .
550 * Values outside the destination range are undefined
551 * and implementation dependent.
552 * See the comments at the beginning of this section.
556 * oil_convert_f32_s16:
561 * Converts elements in from the source type
562 * to the destination type and places the result in .
563 * Values outside the destination range are undefined
564 * and implementation dependent.
565 * See the comments at the beginning of this section.
569 * oil_convert_f32_s32:
574 * Converts elements in from the source type
575 * to the destination type and places the result in .
576 * Values outside the destination range are undefined
577 * and implementation dependent.
578 * See the comments at the beginning of this section.
582 * oil_convert_f32_s8:
587 * Converts elements in from the source type
588 * to the destination type and places the result in .
589 * Values outside the destination range are undefined
590 * and implementation dependent.
591 * See the comments at the beginning of this section.
595 * oil_convert_f32_u16:
600 * Converts elements in from the source type
601 * to the destination type and places the result in .
602 * Values outside the destination range are undefined
603 * and implementation dependent.
604 * See the comments at the beginning of this section.
608 * oil_convert_f32_u32:
613 * Converts elements in from the source type
614 * to the destination type and places the result in .
615 * Values outside the destination range are undefined
616 * and implementation dependent.
617 * See the comments at the beginning of this section.
621 * oil_convert_f32_u8:
626 * Converts elements in from the source type
627 * to the destination type and places the result in .
628 * Values outside the destination range are undefined
629 * and implementation dependent.
630 * See the comments at the beginning of this section.
634 * oil_convert_f64_f32:
639 * Converts elements in from the source type
640 * to the destination type and places the result in .
641 * Values outside the destination range are undefined
642 * and implementation dependent.
643 * See the comments at the beginning of this section.
647 * oil_convert_f64_s16:
652 * Converts elements in from the source type
653 * to the destination type and places the result in .
654 * Values outside the destination range are undefined
655 * and implementation dependent.
656 * See the comments at the beginning of this section.
660 * oil_convert_f64_s32:
665 * Converts elements in from the source type
666 * to the destination type and places the result in .
667 * Values outside the destination range are undefined
668 * and implementation dependent.
669 * See the comments at the beginning of this section.
673 * oil_convert_f64_s8:
678 * Converts elements in from the source type
679 * to the destination type and places the result in .
680 * Values outside the destination range are undefined
681 * and implementation dependent.
682 * See the comments at the beginning of this section.
686 * oil_convert_f64_u16:
691 * Converts elements in from the source type
692 * to the destination type and places the result in .
693 * Values outside the destination range are undefined
694 * and implementation dependent.
695 * See the comments at the beginning of this section.
699 * oil_convert_f64_u32:
704 * Converts elements in from the source type
705 * to the destination type and places the result in .
706 * Values outside the destination range are undefined
707 * and implementation dependent.
708 * See the comments at the beginning of this section.
712 * oil_convert_f64_u8:
717 * Converts elements in from the source type
718 * to the destination type and places the result in .
719 * Values outside the destination range are undefined
720 * and implementation dependent.
721 * See the comments at the beginning of this section.
725 * oil_convert_s16_f32:
730 * Converts elements in from the source type
731 * to the destination type and places the result in .
732 * Values outside the destination range are undefined
733 * and implementation dependent.
734 * See the comments at the beginning of this section.
738 * oil_convert_s16_f64:
743 * Converts elements in from the source type
744 * to the destination type and places the result in .
745 * Values outside the destination range are undefined
746 * and implementation dependent.
747 * See the comments at the beginning of this section.
751 * oil_convert_s16_s32:
756 * Converts elements in from the source type
757 * to the destination type and places the result in .
758 * Values outside the destination range are undefined
759 * and implementation dependent.
760 * See the comments at the beginning of this section.
764 * oil_convert_s16_s8:
769 * Converts elements in from the source type
770 * to the destination type and places the result in .
771 * Values outside the destination range are undefined
772 * and implementation dependent.
773 * See the comments at the beginning of this section.
777 * oil_convert_s16_u16:
782 * Converts elements in from the source type
783 * to the destination type and places the result in .
784 * Values outside the destination range are undefined
785 * and implementation dependent.
786 * See the comments at the beginning of this section.
790 * oil_convert_s16_u32:
795 * Converts elements in from the source type
796 * to the destination type and places the result in .
797 * Values outside the destination range are undefined
798 * and implementation dependent.
799 * See the comments at the beginning of this section.
803 * oil_convert_s16_u8:
808 * Converts elements in from the source type
809 * to the destination type and places the result in .
810 * Values outside the destination range are undefined
811 * and implementation dependent.
812 * See the comments at the beginning of this section.
816 * oil_convert_s32_f32:
821 * Converts elements in from the source type
822 * to the destination type and places the result in .
823 * Values outside the destination range are undefined
824 * and implementation dependent.
825 * See the comments at the beginning of this section.
829 * oil_convert_s32_f64:
834 * Converts elements in from the source type
835 * to the destination type and places the result in .
836 * Values outside the destination range are undefined
837 * and implementation dependent.
838 * See the comments at the beginning of this section.
842 * oil_convert_s32_s16:
847 * Converts elements in from the source type
848 * to the destination type and places the result in .
849 * Values outside the destination range are undefined
850 * and implementation dependent.
851 * See the comments at the beginning of this section.
855 * oil_convert_s32_s8:
860 * Converts elements in from the source type
861 * to the destination type and places the result in .
862 * Values outside the destination range are undefined
863 * and implementation dependent.
864 * See the comments at the beginning of this section.
868 * oil_convert_s32_u16:
873 * Converts elements in from the source type
874 * to the destination type and places the result in .
875 * Values outside the destination range are undefined
876 * and implementation dependent.
877 * See the comments at the beginning of this section.
881 * oil_convert_s32_u32:
886 * Converts elements in from the source type
887 * to the destination type and places the result in .
888 * Values outside the destination range are undefined
889 * and implementation dependent.
890 * See the comments at the beginning of this section.
894 * oil_convert_s32_u8:
899 * Converts elements in from the source type
900 * to the destination type and places the result in .
901 * Values outside the destination range are undefined
902 * and implementation dependent.
903 * See the comments at the beginning of this section.
907 * oil_convert_s8_f32:
912 * Converts elements in from the source type
913 * to the destination type and places the result in .
914 * Values outside the destination range are undefined
915 * and implementation dependent.
916 * See the comments at the beginning of this section.
920 * oil_convert_s8_f64:
925 * Converts elements in from the source type
926 * to the destination type and places the result in .
927 * Values outside the destination range are undefined
928 * and implementation dependent.
929 * See the comments at the beginning of this section.
933 * oil_convert_s8_s16:
938 * Converts elements in from the source type
939 * to the destination type and places the result in .
940 * Values outside the destination range are undefined
941 * and implementation dependent.
942 * See the comments at the beginning of this section.
946 * oil_convert_s8_s32:
951 * Converts elements in from the source type
952 * to the destination type and places the result in .
953 * Values outside the destination range are undefined
954 * and implementation dependent.
955 * See the comments at the beginning of this section.
959 * oil_convert_s8_u16:
964 * Converts elements in from the source type
965 * to the destination type and places the result in .
966 * Values outside the destination range are undefined
967 * and implementation dependent.
968 * See the comments at the beginning of this section.
972 * oil_convert_s8_u32:
977 * Converts elements in from the source type
978 * to the destination type and places the result in .
979 * Values outside the destination range are undefined
980 * and implementation dependent.
981 * See the comments at the beginning of this section.
990 * Converts elements in from the source type
991 * to the destination type and places the result in .
992 * Values outside the destination range are undefined
993 * and implementation dependent.
994 * See the comments at the beginning of this section.
998 * oil_convert_u16_f32:
1003 * Converts elements in from the source type
1004 * to the destination type and places the result in .
1005 * Values outside the destination range are undefined
1006 * and implementation dependent.
1007 * See the comments at the beginning of this section.
1011 * oil_convert_u16_f64:
1016 * Converts elements in from the source type
1017 * to the destination type and places the result in .
1018 * Values outside the destination range are undefined
1019 * and implementation dependent.
1020 * See the comments at the beginning of this section.
1024 * oil_convert_u16_s16:
1029 * Converts elements in from the source type
1030 * to the destination type and places the result in .
1031 * Values outside the destination range are undefined
1032 * and implementation dependent.
1033 * See the comments at the beginning of this section.
1037 * oil_convert_u16_s32:
1042 * Converts elements in from the source type
1043 * to the destination type and places the result in .
1044 * Values outside the destination range are undefined
1045 * and implementation dependent.
1046 * See the comments at the beginning of this section.
1050 * oil_convert_u16_s8:
1055 * Converts elements in from the source type
1056 * to the destination type and places the result in .
1057 * Values outside the destination range are undefined
1058 * and implementation dependent.
1059 * See the comments at the beginning of this section.
1063 * oil_convert_u16_u32:
1068 * Converts elements in from the source type
1069 * to the destination type and places the result in .
1070 * Values outside the destination range are undefined
1071 * and implementation dependent.
1072 * See the comments at the beginning of this section.
1076 * oil_convert_u16_u8:
1081 * Converts elements in from the source type
1082 * to the destination type and places the result in .
1083 * Values outside the destination range are undefined
1084 * and implementation dependent.
1085 * See the comments at the beginning of this section.
1089 * oil_convert_u32_f32:
1094 * Converts elements in from the source type
1095 * to the destination type and places the result in .
1096 * Values outside the destination range are undefined
1097 * and implementation dependent.
1098 * See the comments at the beginning of this section.
1102 * oil_convert_u32_f64:
1107 * Converts elements in from the source type
1108 * to the destination type and places the result in .
1109 * Values outside the destination range are undefined
1110 * and implementation dependent.
1111 * See the comments at the beginning of this section.
1115 * oil_convert_u32_s16:
1120 * Converts elements in from the source type
1121 * to the destination type and places the result in .
1122 * Values outside the destination range are undefined
1123 * and implementation dependent.
1124 * See the comments at the beginning of this section.
1128 * oil_convert_u32_s32:
1133 * Converts elements in from the source type
1134 * to the destination type and places the result in .
1135 * Values outside the destination range are undefined
1136 * and implementation dependent.
1137 * See the comments at the beginning of this section.
1141 * oil_convert_u32_s8:
1146 * Converts elements in from the source type
1147 * to the destination type and places the result in .
1148 * Values outside the destination range are undefined
1149 * and implementation dependent.
1150 * See the comments at the beginning of this section.
1154 * oil_convert_u32_u16:
1159 * Converts elements in from the source type
1160 * to the destination type and places the result in .
1161 * Values outside the destination range are undefined
1162 * and implementation dependent.
1163 * See the comments at the beginning of this section.
1167 * oil_convert_u32_u8:
1172 * Converts elements in from the source type
1173 * to the destination type and places the result in .
1174 * Values outside the destination range are undefined
1175 * and implementation dependent.
1176 * See the comments at the beginning of this section.
1180 * oil_convert_u8_f32:
1185 * Converts elements in from the source type
1186 * to the destination type and places the result in .
1187 * Values outside the destination range are undefined
1188 * and implementation dependent.
1189 * See the comments at the beginning of this section.
1193 * oil_convert_u8_f64:
1198 * Converts elements in from the source type
1199 * to the destination type and places the result in .
1200 * Values outside the destination range are undefined
1201 * and implementation dependent.
1202 * See the comments at the beginning of this section.
1206 * oil_convert_u8_s16:
1211 * Converts elements in from the source type
1212 * to the destination type and places the result in .
1213 * Values outside the destination range are undefined
1214 * and implementation dependent.
1215 * See the comments at the beginning of this section.
1219 * oil_convert_u8_s32:
1224 * Converts elements in from the source type
1225 * to the destination type and places the result in .
1226 * Values outside the destination range are undefined
1227 * and implementation dependent.
1228 * See the comments at the beginning of this section.
1232 * oil_convert_u8_s8:
1237 * Converts elements in from the source type
1238 * to the destination type and places the result in .
1239 * Values outside the destination range are undefined
1240 * and implementation dependent.
1241 * See the comments at the beginning of this section.
1245 * oil_convert_u8_u16:
1250 * Converts elements in from the source type
1251 * to the destination type and places the result in .
1252 * Values outside the destination range are undefined
1253 * and implementation dependent.
1254 * See the comments at the beginning of this section.
1258 * oil_convert_u8_u32:
1263 * Converts elements in from the source type
1264 * to the destination type and places the result in .
1265 * Values outside the destination range are undefined
1266 * and implementation dependent.
1267 * See the comments at the beginning of this section.
1272 #ifdef __SYMBIAN32__
1274 OilFunctionClass* __oil_function_class_convert_s16_s8() {
1275 return &_oil_function_class_convert_s16_s8;
1279 #ifdef __SYMBIAN32__
1281 OilFunctionClass* __oil_function_class_convert_s16_u8() {
1282 return &_oil_function_class_convert_s16_u8;
1286 #ifdef __SYMBIAN32__
1288 OilFunctionClass* __oil_function_class_convert_s32_s8() {
1289 return &_oil_function_class_convert_s32_s8;
1293 #ifdef __SYMBIAN32__
1295 OilFunctionClass* __oil_function_class_convert_s32_u8() {
1296 return &_oil_function_class_convert_s32_u8;
1300 #ifdef __SYMBIAN32__
1302 OilFunctionClass* __oil_function_class_convert_s32_s16() {
1303 return &_oil_function_class_convert_s32_s16;
1307 #ifdef __SYMBIAN32__
1309 OilFunctionClass* __oil_function_class_convert_s32_u16() {
1310 return &_oil_function_class_convert_s32_u16;
1314 #ifdef __SYMBIAN32__
1316 OilFunctionClass* __oil_function_class_convert_u16_u8() {
1317 return &_oil_function_class_convert_u16_u8;
1321 #ifdef __SYMBIAN32__
1323 OilFunctionClass* __oil_function_class_convert_u32_u8() {
1324 return &_oil_function_class_convert_u32_u8;
1328 #ifdef __SYMBIAN32__
1330 OilFunctionClass* __oil_function_class_convert_u32_u16() {
1331 return &_oil_function_class_convert_u32_u16;
1335 #ifdef __SYMBIAN32__
1337 OilFunctionClass* __oil_function_class_convert_s8_u8() {
1338 return &_oil_function_class_convert_s8_u8;
1342 #ifdef __SYMBIAN32__
1344 OilFunctionClass* __oil_function_class_convert_s8_u16() {
1345 return &_oil_function_class_convert_s8_u16;
1349 #ifdef __SYMBIAN32__
1351 OilFunctionClass* __oil_function_class_convert_s8_u32() {
1352 return &_oil_function_class_convert_s8_u32;
1356 #ifdef __SYMBIAN32__
1358 OilFunctionClass* __oil_function_class_convert_u8_u32() {
1359 return &_oil_function_class_convert_u8_u32;
1363 #ifdef __SYMBIAN32__
1365 OilFunctionClass* __oil_function_class_convert_u8_u16() {
1366 return &_oil_function_class_convert_u8_u16;
1370 #ifdef __SYMBIAN32__
1372 OilFunctionClass* __oil_function_class_convert_s16_u16() {
1373 return &_oil_function_class_convert_s16_u16;
1377 #ifdef __SYMBIAN32__
1379 OilFunctionClass* __oil_function_class_convert_s16_u32() {
1380 return &_oil_function_class_convert_s16_u32;
1384 #ifdef __SYMBIAN32__
1386 OilFunctionClass* __oil_function_class_convert_s32_u32() {
1387 return &_oil_function_class_convert_s32_u32;
1391 #ifdef __SYMBIAN32__
1393 OilFunctionClass* __oil_function_class_convert_u16_u32() {
1394 return &_oil_function_class_convert_u16_u32;
1398 #ifdef __SYMBIAN32__
1400 OilFunctionClass* __oil_function_class_convert_s8_s16() {
1401 return &_oil_function_class_convert_s8_s16;
1405 #ifdef __SYMBIAN32__
1407 OilFunctionClass* __oil_function_class_convert_s8_s32() {
1408 return &_oil_function_class_convert_s8_s32;
1412 #ifdef __SYMBIAN32__
1414 OilFunctionClass* __oil_function_class_convert_u8_s16() {
1415 return &_oil_function_class_convert_u8_s16;
1419 #ifdef __SYMBIAN32__
1421 OilFunctionClass* __oil_function_class_convert_u8_s32() {
1422 return &_oil_function_class_convert_u8_s32;
1426 #ifdef __SYMBIAN32__
1428 OilFunctionClass* __oil_function_class_convert_s16_s32() {
1429 return &_oil_function_class_convert_s16_s32;
1433 #ifdef __SYMBIAN32__
1435 OilFunctionClass* __oil_function_class_convert_u16_s32() {
1436 return &_oil_function_class_convert_u16_s32;
1440 #ifdef __SYMBIAN32__
1442 OilFunctionClass* __oil_function_class_convert_u8_s8() {
1443 return &_oil_function_class_convert_u8_s8;
1447 #ifdef __SYMBIAN32__
1449 OilFunctionClass* __oil_function_class_convert_u16_s16() {
1450 return &_oil_function_class_convert_u16_s16;
1454 #ifdef __SYMBIAN32__
1456 OilFunctionClass* __oil_function_class_convert_u32_s32() {
1457 return &_oil_function_class_convert_u32_s32;
1461 #ifdef __SYMBIAN32__
1463 OilFunctionClass* __oil_function_class_convert_s8_f32() {
1464 return &_oil_function_class_convert_s8_f32;
1468 #ifdef __SYMBIAN32__
1470 OilFunctionClass* __oil_function_class_convert_s8_f64() {
1471 return &_oil_function_class_convert_s8_f64;
1475 #ifdef __SYMBIAN32__
1477 OilFunctionClass* __oil_function_class_convert_u8_f32() {
1478 return &_oil_function_class_convert_u8_f32;
1482 #ifdef __SYMBIAN32__
1484 OilFunctionClass* __oil_function_class_convert_u8_f64() {
1485 return &_oil_function_class_convert_u8_f64;
1489 #ifdef __SYMBIAN32__
1491 OilFunctionClass* __oil_function_class_convert_s16_f32() {
1492 return &_oil_function_class_convert_s16_f32;
1496 #ifdef __SYMBIAN32__
1498 OilFunctionClass* __oil_function_class_convert_s16_f64() {
1499 return &_oil_function_class_convert_s16_f64;
1503 #ifdef __SYMBIAN32__
1505 OilFunctionClass* __oil_function_class_convert_u16_f32() {
1506 return &_oil_function_class_convert_u16_f32;
1510 #ifdef __SYMBIAN32__
1512 OilFunctionClass* __oil_function_class_convert_u16_f64() {
1513 return &_oil_function_class_convert_u16_f64;
1517 #ifdef __SYMBIAN32__
1519 OilFunctionClass* __oil_function_class_convert_s32_f64() {
1520 return &_oil_function_class_convert_s32_f64;
1524 #ifdef __SYMBIAN32__
1526 OilFunctionClass* __oil_function_class_convert_u32_f64() {
1527 return &_oil_function_class_convert_u32_f64;
1533 #ifdef __SYMBIAN32__
1535 EXPORT_C void** _oil_function_class_ptr_convert_s16_s8 () {
1536 oil_function_class_ptr_convert_s16_s8 = __oil_function_class_convert_s16_s8();
1537 return &oil_function_class_ptr_convert_s16_s8->func;
1541 #ifdef __SYMBIAN32__
1543 EXPORT_C void** _oil_function_class_ptr_convert_s16_u8 () {
1544 oil_function_class_ptr_convert_s16_u8 = __oil_function_class_convert_s16_u8();
1545 return &oil_function_class_ptr_convert_s16_u8->func;
1549 #ifdef __SYMBIAN32__
1551 EXPORT_C void** _oil_function_class_ptr_convert_s32_s8 () {
1552 oil_function_class_ptr_convert_s32_s8 = __oil_function_class_convert_s32_s8();
1553 return &oil_function_class_ptr_convert_s32_s8->func;
1557 #ifdef __SYMBIAN32__
1559 EXPORT_C void** _oil_function_class_ptr_convert_s32_u8 () {
1560 oil_function_class_ptr_convert_s32_u8 = __oil_function_class_convert_s32_u8();
1561 return &oil_function_class_ptr_convert_s32_u8->func;
1565 #ifdef __SYMBIAN32__
1567 EXPORT_C void** _oil_function_class_ptr_convert_s32_s16 () {
1568 oil_function_class_ptr_convert_s32_s16 = __oil_function_class_convert_s32_s16();
1569 return &oil_function_class_ptr_convert_s32_s16->func;
1573 #ifdef __SYMBIAN32__
1575 EXPORT_C void** _oil_function_class_ptr_convert_s32_u16 () {
1576 oil_function_class_ptr_convert_s32_u16 = __oil_function_class_convert_s32_u16();
1577 return &oil_function_class_ptr_convert_s32_u16->func;
1581 #ifdef __SYMBIAN32__
1583 EXPORT_C void** _oil_function_class_ptr_convert_u16_u8 () {
1584 oil_function_class_ptr_convert_u16_u8 = __oil_function_class_convert_u16_u8();
1585 return &oil_function_class_ptr_convert_u16_u8->func;
1589 #ifdef __SYMBIAN32__
1591 EXPORT_C void** _oil_function_class_ptr_convert_u32_u8 () {
1592 oil_function_class_ptr_convert_u32_u8 = __oil_function_class_convert_u32_u8();
1593 return &oil_function_class_ptr_convert_u32_u8->func;
1597 #ifdef __SYMBIAN32__
1599 EXPORT_C void** _oil_function_class_ptr_convert_u32_u16 () {
1600 oil_function_class_ptr_convert_u32_u16 = __oil_function_class_convert_u32_u16();
1601 return &oil_function_class_ptr_convert_u32_u16->func;
1605 #ifdef __SYMBIAN32__
1607 EXPORT_C void** _oil_function_class_ptr_convert_s8_u8 () {
1608 oil_function_class_ptr_convert_s8_u8 = __oil_function_class_convert_s8_u8();
1609 return &oil_function_class_ptr_convert_s8_u8->func;
1613 #ifdef __SYMBIAN32__
1615 EXPORT_C void** _oil_function_class_ptr_convert_s8_u16 () {
1616 oil_function_class_ptr_convert_s8_u16 = __oil_function_class_convert_s8_u16();
1617 return &oil_function_class_ptr_convert_s8_u16->func;
1621 #ifdef __SYMBIAN32__
1623 EXPORT_C void** _oil_function_class_ptr_convert_s8_u32 () {
1624 oil_function_class_ptr_convert_s8_u32 = __oil_function_class_convert_s8_u32();
1625 return &oil_function_class_ptr_convert_s8_u32->func;
1629 #ifdef __SYMBIAN32__
1631 EXPORT_C void** _oil_function_class_ptr_convert_u8_u32 () {
1632 oil_function_class_ptr_convert_u8_u32 = __oil_function_class_convert_u8_u32();
1633 return &oil_function_class_ptr_convert_u8_u32->func;
1637 #ifdef __SYMBIAN32__
1639 EXPORT_C void** _oil_function_class_ptr_convert_u8_u16 () {
1640 oil_function_class_ptr_convert_u8_u16 = __oil_function_class_convert_u8_u16();
1641 return &oil_function_class_ptr_convert_u8_u16->func;
1645 #ifdef __SYMBIAN32__
1647 EXPORT_C void** _oil_function_class_ptr_convert_s16_u16 () {
1648 oil_function_class_ptr_convert_s16_u16 = __oil_function_class_convert_s16_u16();
1649 return &oil_function_class_ptr_convert_s16_u16->func;
1653 #ifdef __SYMBIAN32__
1655 EXPORT_C void** _oil_function_class_ptr_convert_s16_u32 () {
1656 oil_function_class_ptr_convert_s16_u32 = __oil_function_class_convert_s16_u32();
1657 return &oil_function_class_ptr_convert_s16_u32->func;
1661 #ifdef __SYMBIAN32__
1663 EXPORT_C void** _oil_function_class_ptr_convert_s32_u32 () {
1664 oil_function_class_ptr_convert_s32_u32 = __oil_function_class_convert_s32_u32();
1665 return &oil_function_class_ptr_convert_s32_u32->func;
1669 #ifdef __SYMBIAN32__
1671 EXPORT_C void** _oil_function_class_ptr_convert_u16_u32 () {
1672 oil_function_class_ptr_convert_u16_u32 = __oil_function_class_convert_u16_u32();
1673 return &oil_function_class_ptr_convert_u16_u32->func;
1677 #ifdef __SYMBIAN32__
1679 EXPORT_C void** _oil_function_class_ptr_convert_s8_s16 () {
1680 oil_function_class_ptr_convert_s8_s16 = __oil_function_class_convert_s8_s16();
1681 return &oil_function_class_ptr_convert_s8_s16->func;
1685 #ifdef __SYMBIAN32__
1687 EXPORT_C void** _oil_function_class_ptr_convert_s8_s32 () {
1688 oil_function_class_ptr_convert_s8_s32 = __oil_function_class_convert_s8_s32();
1689 return &oil_function_class_ptr_convert_s8_s32->func;
1693 #ifdef __SYMBIAN32__
1695 EXPORT_C void** _oil_function_class_ptr_convert_u8_s16 () {
1696 oil_function_class_ptr_convert_u8_s16 = __oil_function_class_convert_u8_s16();
1697 return &oil_function_class_ptr_convert_u8_s16->func;
1701 #ifdef __SYMBIAN32__
1703 EXPORT_C void** _oil_function_class_ptr_convert_u8_s32 () {
1704 oil_function_class_ptr_convert_u8_s32 = __oil_function_class_convert_u8_s32();
1705 return &oil_function_class_ptr_convert_u8_s32->func;
1709 #ifdef __SYMBIAN32__
1711 EXPORT_C void** _oil_function_class_ptr_convert_s16_s32 () {
1712 oil_function_class_ptr_convert_s16_s32 = __oil_function_class_convert_s16_s32();
1713 return &oil_function_class_ptr_convert_s16_s32->func;
1717 #ifdef __SYMBIAN32__
1719 EXPORT_C void** _oil_function_class_ptr_convert_u16_s32 () {
1720 oil_function_class_ptr_convert_u16_s32 = __oil_function_class_convert_u16_s32();
1721 return &oil_function_class_ptr_convert_u16_s32->func;
1725 #ifdef __SYMBIAN32__
1727 EXPORT_C void** _oil_function_class_ptr_convert_u8_s8 () {
1728 oil_function_class_ptr_convert_u8_s8 = __oil_function_class_convert_u8_s8();
1729 return &oil_function_class_ptr_convert_u8_s8->func;
1733 #ifdef __SYMBIAN32__
1735 EXPORT_C void** _oil_function_class_ptr_convert_u16_s16 () {
1736 oil_function_class_ptr_convert_u16_s16 = __oil_function_class_convert_u16_s16();
1737 return &oil_function_class_ptr_convert_u16_s16->func;
1741 #ifdef __SYMBIAN32__
1743 EXPORT_C void** _oil_function_class_ptr_convert_u32_s32 () {
1744 oil_function_class_ptr_convert_u32_s32 = __oil_function_class_convert_u32_s32();
1745 return &oil_function_class_ptr_convert_u32_s32->func;
1749 #ifdef __SYMBIAN32__
1751 EXPORT_C void** _oil_function_class_ptr_convert_s8_f32 () {
1752 oil_function_class_ptr_convert_s8_f32 = __oil_function_class_convert_s8_f32();
1753 return &oil_function_class_ptr_convert_s8_f32->func;
1757 #ifdef __SYMBIAN32__
1759 EXPORT_C void** _oil_function_class_ptr_convert_s8_f64 () {
1760 oil_function_class_ptr_convert_s8_f64 = __oil_function_class_convert_s8_f64();
1761 return &oil_function_class_ptr_convert_s8_f64->func;
1765 #ifdef __SYMBIAN32__
1767 EXPORT_C void** _oil_function_class_ptr_convert_u8_f32 () {
1768 oil_function_class_ptr_convert_u8_f32 = __oil_function_class_convert_u8_f32();
1769 return &oil_function_class_ptr_convert_u8_f32->func;
1773 #ifdef __SYMBIAN32__
1775 EXPORT_C void** _oil_function_class_ptr_convert_u8_f64 () {
1776 oil_function_class_ptr_convert_u8_f64 = __oil_function_class_convert_u8_f64();
1777 return &oil_function_class_ptr_convert_u8_f64->func;
1781 #ifdef __SYMBIAN32__
1783 EXPORT_C void** _oil_function_class_ptr_convert_s16_f32 () {
1784 oil_function_class_ptr_convert_s16_f32 = __oil_function_class_convert_s16_f32();
1785 return &oil_function_class_ptr_convert_s16_f32->func;
1789 #ifdef __SYMBIAN32__
1791 EXPORT_C void** _oil_function_class_ptr_convert_s16_f64 () {
1792 oil_function_class_ptr_convert_s16_f64 = __oil_function_class_convert_s16_f64();
1793 return &oil_function_class_ptr_convert_s16_f64->func;
1797 #ifdef __SYMBIAN32__
1799 EXPORT_C void** _oil_function_class_ptr_convert_u16_f32 () {
1800 oil_function_class_ptr_convert_u16_f32 = __oil_function_class_convert_u16_f32();
1801 return &oil_function_class_ptr_convert_u16_f32->func;
1805 #ifdef __SYMBIAN32__
1807 EXPORT_C void** _oil_function_class_ptr_convert_u16_f64 () {
1808 oil_function_class_ptr_convert_u16_f64 = __oil_function_class_convert_u16_f64();
1809 return &oil_function_class_ptr_convert_u16_f64->func;
1813 #ifdef __SYMBIAN32__
1815 EXPORT_C void** _oil_function_class_ptr_convert_s32_f64 () {
1816 oil_function_class_ptr_convert_s32_f64 = __oil_function_class_convert_s32_f64();
1817 return &oil_function_class_ptr_convert_s32_f64->func;
1821 #ifdef __SYMBIAN32__
1823 EXPORT_C void** _oil_function_class_ptr_convert_u32_f64 () {
1824 oil_function_class_ptr_convert_u32_f64 = __oil_function_class_convert_u32_f64();
1825 return &oil_function_class_ptr_convert_u32_f64->func;