示例#1
0
文件: count.c 项目: Camelek/qtmoko
Word32 DeltaWeightedOperation ()
{
    Word32 NewWOper, delta;

    NewWOper = TotalWeightedOperation ();
    delta = NewWOper - LastWOper[currCounter];
    LastWOper[currCounter] = NewWOper;
    return (delta);
}
示例#2
0
Word32 DeltaWeightedOperation () {
#if WMOPS
    Word32 NewWOper, delta;

    NewWOper = TotalWeightedOperation ();
    delta = NewWOper - LastWOper[currCounter];
    LastWOper[currCounter] = NewWOper;
    return (delta);

#else /* ifdef WMOPS */
    return 0; /* Dummy */

#endif /* ifdef WMOPS */
}
示例#3
0
static Word32 WMOPS_frameStat() {
/* calculate the WMOPS seen so far and update the global
   per-frame maximum (glob_wc)
 */
    Word32 tot;

    tot = TotalWeightedOperation ();
    if (tot > glob_wc[currCounter])
        glob_wc[currCounter] = tot;

    /* check if fwc() was forgotten at end of last frame */
    if (tot > LastWOper[currCounter]) {
        if (!fwc_corr[currCounter]) {
            fprintf(stderr,
                    "count: operations counted after last fwc() for '%s'; "
                    "-> fwc() called\n",
                    objectName[currCounter]?objectName[currCounter]:"");
        }
        fwc();
    }
    
    return tot;
}