Commit a6e61ec2 authored by malenov's avatar malenov
Browse files

remove count.h and count.c

parent d5ae7514
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -11,11 +11,6 @@

#include "stl.h"

#ifdef WMOPS
extern int currCounter;
#endif /* if WMOPS */


#ifdef COMPLEX_OPERATOR

/* ================================ New Complex Basops ========================= */

lib_com/count.c

deleted100644 → 0
+0 −1207

File deleted.

Preview size limit exceeded, changes collapsed.

lib_com/count.h

deleted100644 → 0
+0 −227
Original line number Diff line number Diff line
/*
  ===========================================================================
   File: COUNT.H                                         v.2.3 - 30.Nov.2009
  ===========================================================================

            ITU-T         STL         BASIC       OPERATORS

            PROTOTYPES & DEFINITION FOR COUNTING OPERATIONS

   History
   09.Aug.1999 V1.0.0   Input to UGST from ETSI AMR (count.h);

   26.Jan.2000 V1.1.0   Added counter entries for G.723.1's
                        L_mls(), div_l(), i_mult() [from basop32.c]

   05.Jul.2000 V1.2.0   Added counter entries for 32bit shiftless
                        operators L_mult0(), L_mac0(), L_msu0()

   03 Nov 04   v2.0     Incorporation of new 32-bit / 40-bit / control
                        operators for the ITU-T Standard Tool Library as
                        described in Geneva, 20-30 January 2004 WP 3/16 Q10/16
                        TD 11 document and subsequent discussions on the
                        wp3audio@yahoogroups.com email reflector.
   March 06    v2.1     Changed to improve portability.
   Dec 06      v2.2     Changed to specify frame rate using setFrameRate()
                        Adding WMOPS_output_avg() for global average computation
                        L_mls() weight of 5.
                        div_l() weight of 32.
                        i_mult() weight of 3.
  ============================================================================
*/


/******************************************************************************
 * Functions for counting operations.
 *
 * These functions make it possible to measure the wMOPS of a codec.
 *
 * All functions in this file, and in other *.h files, update a structure so
 * that it will be possible to track how many calls to add(), sub(), L_mult()
 * ... was made by the code and to estimate the wMOPS (and MIPS) for a certain
 * part of the code.
 *
 * It is also possible to measure the wMOPS separatly for different parts
 * of the codec.
 *
 * This is done by creating a counter group (getCounterId) for each part of
 * the code that one wants a seperate measure for. Before a part of the code
 * is executed a call to the "setCounter" function is needed to identify
 * which counter group to use.
 *
 * Currently there is a limit of 255 different counter groups.
 *
 * In the end of this file, there is a piece of code illustrating how the
 * functions can be used.
 *
 ******************************************************************************/


#ifndef _COUNT_H
#define _COUNT_H "$Id$"

#include <assert.h>

int calc_hash( const char *str );

int getCounterId( const char *objectName );
/*
 * Create a counter group, the "objectname" will be used when printing
 * statistics for this counter group.
 *
 * Returns 0 if no more counter groups are available.
 */


int readCounterId( void );
/*
 * Returns the current CounterId.
 */


void setCounter( int counterId );
/*
 * Defines which counter group to use, default is zero.
 */


char *readCounterIdName( void );
/*
 * Returns the current CounterId name.
 */
void printStack( char *text, char *Id );
/*
 * print stack
 *    text: Any text to print initially
 *    Id:   NULL, if no prints are wanted
 *          "*", if all prints are wanted (default)
 *          "pitch_ol" or any other function name
 */

void incrementNbTimeObjectIsCalled( int counterId );
/*
 * This function enables to increment by 1 a counter
 * tracking the number of times the application enters a groups of functions.
 * If the counterId is not refering to a defined function counter group, then it is
 * the default function group (0) which is impacted.
 *
 */


void ClearNbTimeObjectsAreCalled( void );
/*
 * This function enables to clear to 0 all the counters enabling to
 * track the number of times the application enters any groups of functions.
 */


void Init_WMOPS_counter( void );
/*
 * Initiates the current counter group.
 */


Word32 Reset_WMOPS_counter( void );
/*
 * Resets the current counter group.
 */


void WMOPS_output( Word16 notPrintWorstWorstCase );
/*
 * Prints the statistics to the screen, if the argument is non zero
 * the statistics for worst worst case will not be printed. This is typically
 * done for dtx frames.
 *
 */

void WMOPS_output_avg( Word16 dtx_mode, Word32 *tot_wm, Word32 *num_frames );
/*
 * same as WMOPS_output + returns the total wmops counter and the number of frames
 * to support the computation of global average.
 *
 */




void setFrameRate( int samplingFreq, int frameLength );
/*
 * This function can overwrite the value of the frameRate variable that is
 * initialized by the FRAME_RATE constant.
 */





/* Global counter variable for calculation of complexity weight */


void generic_WMOPS_output( Word16 notPrintWorstWorstCase, char *test_file_name );
/*
 * This function enable to append :
 * - to WMOPS_DATA_FILENAME file, the WMOPS information related
 *   to the execution of the application, function group by function
 *   group.
 * - to CODE_PROFILE_FILENAME file, the WMOPS information related
 *   to the execution of the application, basic operation by basic
 *   operation.
 * - to WMOPS_TOTAL_FILENAME file, the total WMOPS information related
 *   to the execution of the application.
 *
 * Note that :
 * if the files exists, the data will be written at the end of file.
 *
 * test_file_name : Is a character string referencing each calls to
 *                  generic_WMOPS_output(). Usually, it is the name of a test
 *                  sequence file.
 *
 * notPrintWorstWorstCase : Same usage as in WMOPS_output().
 */
void WMOPS_output_all( Word16 dtx_mode );
void WMOPS_output_all_std( Word16 dtx_mode );

/*
 * free all allocated counter memory
 */
void WMOPS_destroy( void );

/* jdr 20120117: add FLC similar functions */
/* mul 20130729: set BASOP_COUNT_SUBROUTINES to count on a per-BASOP_sub_start()/BASOP_sub_end() base;
   otherwise, count only between BASOP_push_wmops(), BASOP_push_wmops() */
#define BASOP_COUNT_SUBROUTINES
void BASOP_push_wmops( const char *label );
Word32 BASOP_pop_wmops( void );

#ifdef BASOP_COUNT_SUBROUTINES
#define BASOP_sub_start( label )   \
    {                              \
        BASOP_push_wmops( label ); \
    }
#define BASOP_sub_end()    \
    {                      \
        BASOP_pop_wmops(); \
    }
#else
#define BASOP_sub_start( label )
#define BASOP_sub_end()
#endif

void BASOP_frame_update( void );
void Reset_all_WMOPS_counter( void );

Word32 BASOP_get_wops( void );

/*! Returns the total min/max/avg WMOPS values like printed in BASOP_end(). */
void BASOP_get_total_wmops( double *min, double *max, double *avg );


#define SUB_WMOPS_INIT( label ) BASOP_sub_start( label )
#define END_SUB_WMOPS           BASOP_sub_end()


#endif /* _COUNT_H */


/* end of file */
+0 −5
Original line number Diff line number Diff line
@@ -58,11 +58,6 @@

#define WMC_TOOL_SKIP

#ifdef WMOPS
extern int currCounter;
#endif /* ifdef WMOPS */


/*****************************************************************************
 *
 *   Constants and Globals
+0 −1
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@
#include "prot_fx.h"
#include "oper_32b.h"
#include "move.h"
#include "count.h"

/*--------------------------------------------------------------------------*
 * hq2_noise_inject()
Loading