00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef _OPTIMIZED_FUNCTIONS_H_
00042 #define _OPTIMIZED_FUNCTIONS_H_
00043
00044
00045
00046 #ifdef OPT_DEFINE
00047 #define OPTIMIZED_FUNCTION
00048 #define OPTIMIZED_FUNCTION_END = 0
00049 #else
00050 #define OPTIMIZED_FUNCTION extern
00051 #define OPTIMIZED_FUNCTION_END
00052 #endif
00053
00054
00055
00056 #define OPTIMIZED_FUNCTION_HEADER_0(name) if (Optimized##name == NULL || Optimized##name() == 0) {
00057 #define OPTIMIZED_FUNCTION_HEADER_1(name, p1) if (Optimized##name == NULL || Optimized##name(p1) == 0) {
00058 #define OPTIMIZED_FUNCTION_HEADER_2(name, p1, p2) if (Optimized##name == NULL || Optimized##name(p1, p2) == 0) {
00059 #define OPTIMIZED_FUNCTION_HEADER_2_ROI(name, p1, p2, p3) if (Optimized##name == NULL || p3 != 0 || Optimized##name(p1, p2) == 0) {
00060 #define OPTIMIZED_FUNCTION_HEADER_3(name, p1, p2, p3) if (Optimized##name == NULL || Optimized##name(p1, p2, p3) == 0) {
00061 #define OPTIMIZED_FUNCTION_HEADER_3_ROI(name, p1, p2, p3, p4) if (Optimized##name == NULL || p4 != 0 || Optimized##name(p1, p2, p3) == 0) {
00062 #define OPTIMIZED_FUNCTION_HEADER_4(name, p1, p2, p3, p4) if (Optimized##name == NULL || Optimized##name(p1, p2, p3, p4) == 0) {
00063 #define OPTIMIZED_FUNCTION_HEADER_5(name, p1, p2, p3, p4, p5) if (Optimized##name == NULL || Optimized##name(p1, p2, p3, p4, p5) == 0) {
00064 #define OPTIMIZED_FUNCTION_HEADER_5_RET(name, p1, p2, p3, p4, p5) int nRet; if (Optimized##name != NULL && Optimized##name(p1, p2, p3, p4, p5, nRet) != 0) return nRet;
00065 #define OPTIMIZED_FUNCTION_HEADER_8(name, p1, p2, p3, p4, p5, p6, p7, p8) if (Optimized##name == NULL || Optimized##name(p1, p2, p3, p4, p5, p6, p7, p8) == 0) {
00066 #define OPTIMIZED_FUNCTION_HEADER_8_ROI(name, p1, p2, p3, p4, p5, p6, p7, p8, p9) if (Optimized##name == NULL || p9 != 0 || Optimized##name(p1, p2, p3, p4, p5, p6, p7, p8) == 0) {
00067 #define OPTIMIZED_FUNCTION_HEADER_9(name, p1, p2, p3, p4, p5, p6, p7, p8, p9) if (Optimized##name == NULL || Optimized##name(p1, p2, p3, p4, p5, p6, p7, p8, p9) == 0) {
00068
00069 #define OPTIMIZED_FUNCTION_FOOTER }
00070
00071
00072
00073 #define DECLARE_OPTIMIZED_FUNCTION_0(name) typedef int (*DefOptimized##name)(); OPTIMIZED_FUNCTION DefOptimized##name Optimized##name OPTIMIZED_FUNCTION_END;
00074 #define DECLARE_OPTIMIZED_FUNCTION_1(name, p1) typedef int (*DefOptimized##name)(p1); OPTIMIZED_FUNCTION DefOptimized##name Optimized##name OPTIMIZED_FUNCTION_END;
00075 #define DECLARE_OPTIMIZED_FUNCTION_2(name, p1, p2) typedef int (*DefOptimized##name)(p1, p2); OPTIMIZED_FUNCTION DefOptimized##name Optimized##name OPTIMIZED_FUNCTION_END;
00076 #define DECLARE_OPTIMIZED_FUNCTION_3(name, p1, p2, p3) typedef int (*DefOptimized##name)(p1, p2, p3); OPTIMIZED_FUNCTION DefOptimized##name Optimized##name OPTIMIZED_FUNCTION_END;
00077 #define DECLARE_OPTIMIZED_FUNCTION_4(name, p1, p2, p3, p4) typedef int (*DefOptimized##name)(p1, p2, p3, p4); OPTIMIZED_FUNCTION DefOptimized##name Optimized##name OPTIMIZED_FUNCTION_END;
00078 #define DECLARE_OPTIMIZED_FUNCTION_5(name, p1, p2, p3, p4, p5) typedef int (*DefOptimized##name)(p1, p2, p3, p4, p5); OPTIMIZED_FUNCTION DefOptimized##name Optimized##name OPTIMIZED_FUNCTION_END;
00079 #define DECLARE_OPTIMIZED_FUNCTION_5_RET(name, p1, p2, p3, p4, p5) typedef int (*DefOptimized##name)(p1, p2, p3, p4, p5, int &nRet); OPTIMIZED_FUNCTION DefOptimized##name Optimized##name OPTIMIZED_FUNCTION_END;
00080 #define DECLARE_OPTIMIZED_FUNCTION_8(name, p1, p2, p3, p4, p5, p6, p7, p8) typedef int (*DefOptimized##name)(p1, p2, p3, p4, p5, p6, p7, p8); OPTIMIZED_FUNCTION DefOptimized##name Optimized##name OPTIMIZED_FUNCTION_END;
00081 #define DECLARE_OPTIMIZED_FUNCTION_9(name, p1, p2, p3, p4, p5, p6, p7, p8, p9) typedef int (*DefOptimized##name)(p1, p2, p3, p4, p5, p6, p7, p8, p9); OPTIMIZED_FUNCTION DefOptimized##name Optimized##name OPTIMIZED_FUNCTION_END;
00082
00083
00084
00085 #include "OptimizedFunctionsList.h"
00086
00087
00088
00089 #endif