22 #ifndef _XN_PROFILING_H_ 23 #define _XN_PROFILING_H_ 33 #define INVALID_PROFILING_HANDLE -1 96 #define _XN_PROFILING_START_SECTION(name, mt) \ 98 static XnProfilingHandle __profiling = INVALID_PROFILING_HANDLE; \ 99 if (xnProfilingIsActive()) \ 101 xnProfilingSectionStart(name, mt, &__profiling); \ 104 #define XN_PROFILING_START_SECTION(name) _XN_PROFILING_START_SECTION(name, FALSE) 105 #define XN_PROFILING_START_MT_SECTION(name) _XN_PROFILING_START_SECTION(name, TRUE) 110 #define XN_PROFILING_END_SECTION \ 111 if (__profiling != INVALID_PROFILING_HANDLE) \ 113 xnProfilingSectionEnd(&__profiling); \ 124 #define XN_PROFILING_START_FUNCTION XN_PROFILING_START_SECTION(__FUNCTION__) 129 #define XN_PROFILING_END_FUNCTION XN_PROFILING_END_SECTION 131 #endif //_XN_PROFILING_H_ XN_C_API XnStatus XN_C_DECL xnProfilingInitFromINI(const XnChar *cpINIFileName, const XnChar *cpSectionName)
XnInt32 XnProfilingHandle
Definition: XnProfiling.h:38
XnUInt32 XnStatus
Definition: XnStatus.h:34
XN_C_API XnStatus XN_C_DECL xnProfilingInit(XnUInt32 nProfilingInterval=0)
XN_C_API XnStatus XN_C_DECL xnProfilingShutdown()
XN_C_API XnStatus XN_C_DECL xnProfilingSectionStart(const char *csSectionName, XnBool bMT, XnProfilingHandle *pHandle)
XN_C_API XnStatus XN_C_DECL xnProfilingSectionEnd(XnProfilingHandle *pHandle)
XN_C_API XnBool XN_C_DECL xnProfilingIsActive()