NAME

PAPI_num_hwctrs - return the number of hardware counters

CONTENTS

Synopsis
Description
Arguments
Return Values
Examples
Author
Bugs
See Also

SYNOPSIS

C Interface

#include <papi.h> 

int PAPI_num_hwctrs(); 

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 processor. This count does not include any special purpose registers or performance hardware. PAPI_library_init (3) must be called in order for this function to return anything greater than 0.

ARGUMENTS

This function takes no arguments.

RETURN VALUES

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

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

EXAMPLES


int retval, num;

/* Initialize the library */

retval = PAPI_library_init(PAPI_VER_CURRENT);

if (retval != PAPI_VER_CURRENT) exit(1);

/* Query the substrate for our resources. */

num = PAPI_num_hwctrs(); printf("%d hardware counters found.0,num);

AUTHOR

The PAPI Team. See them at the PAPI Web Site: http://icl.cs.utk.edu/projects/papi

BUGS

None.

SEE ALSO

PAPI_get_opt (3), PAPI_init_library (3), PAPI_num_counters (3), PAPI (3)


PAPI Programmer’s Reference PAPI_num_hwctrs (3) November, 2003

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