NAME

PAPI_num_hwctrs - return the number of hardware counters on the cpu
PAPI_num_cmp_hwctrs - return the number of hardware counters for the specified component

CONTENTS

Synopsis
Description
Arguments
Return Values
Examples
Bugs
See Also

SYNOPSIS

C Interface

#include <papi.h> 

int PAPI_num_hwctrs(); 

int PAPI_num_cmp_hwctrs(int cidx); 

Fortran Interface

#include fpapi.h 

PAPIF_num_hwctrs(C_INT num) 

DESCRIPTION

PAPI_num_hwctrs() returns the number of physical hardware counters present in the cpu. This is included to preserve backward compatability.

PAPI_num_cmp_hwctrs() returns the number of counters present in the specified component. By convention, component 0 is always the cpu. This count does not include any special purpose registers or other performance hardware. PAPI_library_init (3) must be called in order for this function to return anything greater than 0.

ARGUMENTS

cidx -- An integer identifier for a component. By convention, component 0 is always the cpu component.

RETURN VALUES

On success, this function returns a value greater than zero.

A zero result usually means the library has not been initialized.

EXAMPLES


/* Query the cpu component for the number of counters. */
printf("%d hardware counters found.0, PAPI_num_cmp_hwctrs(0));


BUGS

None.

SEE ALSO

PAPI_init_library (3), PAPI (3), PAPI_F (3)


PAPI Programmer’s Reference PAPI_num_hwctrs (3) April, 2007

  Innovative Computing Laboratory
2001 R&D Winner  
Contact PAPI: papi@cs.utk.edu Computer Science Department
  University of Tennessee