/********************************************************************************************* Description: data for profiling Copyright : All right reserved by NCIC.ICT Author : Zhang Zhonghai Date : 2024/04/08 ***********************************************************************************************/ #ifndef __PROFILING_H #define __PROFILING_H #include #include #define TIME_DIVIDE_BY (CLOCKS_PER_SEC * 1.0) #define LIM_TYPE 128 extern uint64_t gprof[LIM_TYPE]; extern uint64_t gdata[LIM_TYPE]; extern FILE *ins_f_arr[LIM_TYPE], *del_f_arr[LIM_TYPE], *score_f_arr[LIM_TYPE], *retval_f_arr[LIM_TYPE]; // GLOBAL performance info enum { G_ALL = 0, G_EXT_SCALAR, G_EXT_AVX2_I16, G_EXT_AVX2_U8, G_EXT_AVX2_I16_SP, G_ALN_I16, G_ALN_U8, G_ALN_AVX2_I16, G_ALN_AVX2_U8 }; #ifdef SHOW_PERF #define PROF_START(tmp_time) uint64_t prof_tmp_##tmp_time = get_msec() #define PROF_END(result, tmp_time) result += get_msec() - prof_tmp_##tmp_time #else #define PROF_START(tmp_time) #define PROF_END(result, tmp_time) #endif // get current milli seconds uint64_t get_msec(); #endif