void Reset_WMOPS_counter (void) { Word32 tot = WMOPS_frameStat(); /* increase the frame counter --> a frame is counted WHEN IT BEGINS */ nbframe[currCounter]++; /* add wmops used in last frame to count, then reset counter */ /* (in first frame, this is a no-op */ total_wmops[currCounter] += ((float) tot) * 0.00005; /* clear counter before new frame starts */ WMOPS_clearMultiCounter(); LastWOper[currCounter] = 0; funcid[currCounter] = 0; /* new frame, set function id to zero */ }
void Init_WMOPS_counter (void) { Word16 i; /* reset function weight operation counter variable */ for (i = 0; i < NbFuncMax; i++) wc[currCounter][i] = (Word32) 0; glob_wc[currCounter] = 0; nbframe[currCounter] = 0; total_wmops[currCounter] = 0.0; /* initially clear all counters */ WMOPS_clearMultiCounter(); LastWOper[currCounter] = 0; funcid[currCounter] = 0; }
void Init_WMOPS_counter (void) { #if WMOPS Word16 i; /* reset function weight operation counter variable */ for (i = 0; i < NbFuncMax; i++) wc[currCounter][i] = (Word32) 0; glob_wc[currCounter] = 0; nbframe[currCounter] = 0; total_wmops[currCounter] = 0.0; /* initially clear all counters */ WMOPS_clearMultiCounter(); LastWOper[currCounter] = 0; funcid[currCounter] = 0; /* Following line is useful for incrIf(), see control.h */ call_occurred = 1; funcId_where_last_call_to_else_occurred=MAXCOUNTERS; #endif /* ifdef WMOPS */ }