module_profile.h
Go to the documentation of this file.
1 /******************************************************************************
2 Copyright (c), 2023 - Analog Devices Inc. All Rights Reserved.
3 This software is PROPRIETARY & CONFIDENTIAL to Analog Devices, Inc.
4 and its licensors.
5 ******************************************************************************/
6 #ifndef __MODULE_PROFILE_H__
7 #define __MODULE_PROFILE_H__
8 
9 #ifdef ENABLE_FUNCTION_PROFILING
10 extern volatile int* pprof_buff;
11 void dumpFunctionParams(int ID);
12 void initProfile(void);
13 void closeProfile(void);
14 void flushProfile(void);
15 
16 #define PROFILE_FUNCTION_START(ID) dumpFunctionParams(ID);
17 #define PROFILE_FUNCTION_END(ID) PROFILE_FUNCTION_START(ID)
18 
19 #define FLUSH_FUNCTION_PROFILE() flushProfile()
20 #define INIT_FUNCTION_PROFILE() initProfile()
21 #define CLOSE_FUNCTION_PROFILE() closeProfile()
22 
23 #else /* !ENABLE_FUNCTION_PROFILING */
24 #define PROFILE_FUNCTION_START(ID)
25 #define PROFILE_FUNCTION_END(ID)
26 
27 #define FLUSH_FUNCTION_PROFILE()
28 #define INIT_FUNCTION_PROFILE()
29 #define CLOSE_FUNCTION_PROFILE()
30 #endif /* !ENABLE_FUNCTION_PROFILING */
31 
32 #ifdef PARSE_FUNCTION
33 #define PROFILE_ID_START() \
34  void profile_id_init(void) \
35  {
36 #define PROFILE_ID_END() }
37 #define PROFILE_ID(id_name, id_num) profiles[id_num].func_name = #id_name;
38 #else
39 #define PROFILE_ID_START()
40 #define PROFILE_ID_END()
41 #define PROFILE_ID(id_name, id_num) static const int id_name = id_num;
42 #endif /* PARSE_FUNCTION */
43 
44 /* ID list */
46 
47 PROFILE_ID(ImageStitch_RUN, 0)
48 PROFILE_ID(ImageStitch_PREPROCESS, 1)
49 PROFILE_ID(ImageStitch_CREATE_COMBINED_CLOUD, 2)
50 PROFILE_ID(ImageStitch_PCLALIGNMENT, 3)
51 PROFILE_ID(ImageStitch_ACCUMULATE_COMBINED_CLOUD, 4)
52 PROFILE_ID(ImageStitch_TRANSFORM_COMBINED_CLOUD, 5)
53 PROFILE_ID(ImageStitch_DISPLAY_POSTPROCESS, 6)
54 PROFILE_ID(ImageStitch_CYLINDRICALPROJECT_IR, 7)
55 PROFILE_ID(ImageStitch_CYLINDRICALPROJECT_DEPTH, 8)
56 PROFILE_ID(CylindricalProjection_Initialize, 9)
57 PROFILE_ID(CylindricalProjection_LoadCloud, 10)
58 PROFILE_ID(CylindricalProjection_MakeImage, 11)
59 PROFILE_ID(CylindricalProjection_ShowImage, 12)
60 PROFILE_ID(GPUProjectPoints, 13)
61 PROFILE_ID(processOutput_Thread, 14)
62 PROFILE_ID(StitchFramesCoreGPU_stitchFrames, 15)
63 PROFILE_ID(StitchFramesCoreGPU_preprocess, 16)
64 PROFILE_ID(StitchFramesCoreGPU_copyIn, 17)
65 PROFILE_ID(StitchFramesCoreGPU_postProcessStage1, 18)
66 PROFILE_ID(StitchFramesCoreGPU_postProcessStage2, 19)
67 PROFILE_ID(StitchFramesCoreGPU_copyOut, 20)
68 PROFILE_ID(Message_Callback_processing, 21)
69 PROFILE_ID(StitchFramesCoreCPU_stitchFrames, 22)
70 PROFILE_ID(StitchFramesCoreCPU_preprocess, 23)
71 PROFILE_ID(StitchFramesCoreCPU_copyIn, 24)
72 PROFILE_ID(StitchFramesCoreCPU_postProcessStage1, 25)
73 PROFILE_ID(StitchFramesCoreCPU_postProcessStage2, 26)
74 PROFILE_ID(StitchFramesCoreCPU_copyOut, 27)
75 
77 
78 #endif /* __MODULE_PROFILE_H__ */
PROFILE_ID
#define PROFILE_ID(id_name, id_num)
Definition: module_profile.h:41
PROFILE_ID_START
#define PROFILE_ID_START()
Definition: module_profile.h:39
PROFILE_ID_END
#define PROFILE_ID_END()
Definition: module_profile.h:40


adi_3dtof_image_stitching
Author(s):
autogenerated on Fri Mar 21 2025 02:27:20