00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _SG_TRC_CONFIG_H
00023 #define _SG_TRC_CONFIG_H
00024
00025
00026
00027
00028
00029
00030 #ifdef _CPP
00031 #ifndef __cplusplus
00032 #define __cplusplus 1
00033 #endif
00034 #else
00035 #endif
00036
00037 #ifdef _WIN32
00038 #ifdef _SG_TRC
00039 #define _SG_TRC_DLL_EXPORT __declspec(dllexport)
00040 #else
00041 #define _SG_TRC_DLL_EXPORT __declspec(dllimport)
00042 #ifdef NDEBUG
00043 #pragma comment(lib ,"SugoiTracer.lib")
00044 #else
00045 #pragma comment(lib ,"SugoiTracerd.lib")
00046 #endif
00047 #endif
00048 #ifdef _VCC2005
00049
00050 #pragma warning(once : 4996) //some C++ functions were declared deprecated, show only once by function.
00051 #endif
00052 #else
00053
00054 #endif
00055
00056 #define _SG_TRC_INLINE inline
00057
00058
00059
00060
00061
00062
00063
00064 #define _SG_TRC_MAX_NBR_FCT 512
00065 #define _SG_TRC_MAX_NBR_RECORDS 512
00066 #define _SG_TRC_MAX_NBR_TIMES 512
00067
00068 #define _SG_TRC_SVG 0
00069
00070
00071 #include <SugoiTools\config.h>
00072
00073 #ifdef __cplusplus
00074
00075 #include <SugoiTools\cl_base_obj.h>
00076 #include <SugoiTools\cl_template_manager.h>
00077 #include <SugoiTools\xml.h>
00078
00079 #ifdef _WIN32
00080 #include <winsock.h>
00081 #else
00082 #include <sys/h>
00083 typedef long int LONGLONG;
00084 #endif
00085
00086 using namespace SGE;
00087
00088 namespace SG_TRC{
00089
00090 template <typename TracerType> class CL_FUNCT_TRC;
00091 template <typename TracerType> class CL_TEMP_TRACER;
00092 template <typename TracerType> class CL_TRACER;
00093 template <typename TracerType> class CL_TRACER_RECORD;
00094 template <typename TracerType> class CL_CLASS_TRACER;
00095 template <typename TracerType> class TTCL_APPLI_TRACER;
00096 class CL_TRACE_BASE_PARAMS;
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108 typedef class CL_TimerVal SG_TRC_Default_Trc_Type;
00109 #define SG_TRC_Default_Trc_Type CL_TimerVal //CL_Virtual_Record
00110
00111 #define SG_TRC_FUNCT_BY_TIME SG_TRC::CL_FUNCT_TRC<SG_TRC::SG_TRC_Default_Trc_Type>
00112 #define SG_TRC_APPLY_BY_TIME SG_TRC::TTCL_APPLI_TRACER<SG_TRC::SG_TRC_Default_Trc_Type>
00113 typedef CL_TEMP_TRACER<SG_TRC_Default_Trc_Type> SG_TRC_TEMP_TRACER_BY_TIME;
00114
00115
00116 #define _BENCH_GL(FctName, Fct, Param, SizeX, SizeY)Fct;
00117 #define _BENCH(FctName, Fct, Param, SizeX, SizeY)Fct;
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135 #define _SG_TRC_FCT_BENCH(FctPtr, Fct, Params){\
00136 SG_TRC_TEMP_TRACER_BY_TIME (ThisFct, NULL);\
00137 Fct;\
00138 }
00139
00140 #define _SG_TRC_FCT_BENCH2(FctName, Fct, Params){\
00141 CL_FUNCT_TRC<CL_TimerVal> *ThisFct = this->ARTimeTracer->AddFunct (FctName);\
00142 SG_TRC_TEMP_TRACER_BY_TIME trace(ThisFct, NULL);\
00143 Fct;\
00144 }
00145
00146 #if 0
00147 #define _SG_TRC_CREATE_CLASS_BENCH(FctName, Params){\
00148 SG_Assert(ClassTracer, "No CL_CLASS_TRACER set for this class!");\
00149 static SG_TRC_FUNCT_BY_TIME = ClassTracer->AddFunct(FctName);\
00150 SG_TRC_TEMP_TRACER_BY_TIME trace(ThisFct, NULL);\
00151 }
00152 #endif
00153
00154 #if _SG_TLS_BENCHMARK
00155 #define _SG_TRC_CREATE_CLASS_BENCH(ClassName){\
00156 if (!ClassTracer)\
00157 {\
00158 TTCL_APPLI_TRACER<CL_TimerVal>::MainAppliTracer->ClassManager->Add(#ClassName);\
00159 SG_Assert(ClassTracer = TTCL_APPLI_TRACER<CL_TimerVal>::MainAppliTracer->ClassManager->GetLastAdded(), "Error while adding new class tracer!");\
00160 }\
00161 }
00162 #else
00163 #define _SG_TRC_CREATE_CLASS_BENCH(ClassName)
00164 #endif
00165
00166
00167 #if _SG_TRC_SVG
00168
00169
00173
00174
00175 #define _CVG_SVG_CREATE_FILES 1
00176
00180 #define _CVG_SVG_CONVERT_TO_PNG _CVG_SVG_CREATE_FILES
00181
00182 #define _CVG_SVG_BATIK_RASTERIZER_PATH "C:\\Program Files\\GPUCV v0.0.2\\resources\\bin\\batik-1.6\\batik-rasterizer.jar"//"..\\resources\\bin\\batik-1.6\\batik-rasterizer.jar"
00183
00184 #define _CVG_SVG_EXPORT_PATH "svg"
00187 #define _CVG_SVG_BATIK_RASTERIZER_SIZE "-w 450 -h 320 "
00188
00189 #endif// 0
00190 };
00191 #endif//__cplusplus
00192
00193
00194 #endif /_SG_TRC_CONFIG_H