PAPI 7.1.0.0
Loading...
Searching...
No Matches
caches.h File Reference
Include dependency graph for caches.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  run_output_t
 

Macros

#define SIZE   (512*1024)
 
#define L_SIZE   0
 
#define C_SIZE   1
 
#define ASSOC   2
 
#define MAXTHREADS   128
 

Functions

static double getticks (void)
 
static double elapsed (double t1, double t0)
 
int compar_lf (const void *a, const void *b)
 
int compar_lld (const void *a, const void *b)
 

Macro Definition Documentation

◆ ASSOC

#define ASSOC   2

Definition at line 35 of file caches.h.

◆ C_SIZE

#define C_SIZE   1

Definition at line 34 of file caches.h.

◆ L_SIZE

#define L_SIZE   0

Definition at line 33 of file caches.h.

◆ MAXTHREADS

#define MAXTHREADS   128

Definition at line 39 of file caches.h.

◆ SIZE

#define SIZE   (512*1024)

Definition at line 31 of file caches.h.

Function Documentation

◆ compar_lf()

int compar_lf ( const void *  a,
const void *  b 
)

Definition at line 1 of file compar.c.

1 {
2 const double *da = (const double *)a;
3 const double *db = (const double *)b;
4 if( *da < *db) return -1;
5 if( *da > *db) return 1;
6 return 0;
7}
static double a[MATRIX_SIZE][MATRIX_SIZE]
Definition: libmsr_basic.c:38
static double b[MATRIX_SIZE][MATRIX_SIZE]
Definition: libmsr_basic.c:39
Here is the caller graph for this function:

◆ compar_lld()

int compar_lld ( const void *  a,
const void *  b 
)

Definition at line 9 of file compar.c.

9 {
10 const long long int *da = (const long long int *)a;
11 const long long int *db = (const long long int *)b;
12 if( *da < *db) return -1;
13 if( *da > *db) return 1;
14 return 0;
15}

◆ elapsed()

static double elapsed ( double  t1,
double  t0 
)
inlinestatic

Definition at line 55 of file caches.h.

55 {
56 return (double)t1 - (double)t0;
57}
volatile double t1
Here is the caller graph for this function:

◆ getticks()

static double getticks ( void  )
inlinestatic

Definition at line 46 of file caches.h.

46 {
47 double ret;
48 struct timeval tv;
49
50 gettimeofday(&tv, NULL);
51 ret = 1000*1000*(double)tv.tv_sec + (double)tv.tv_usec;
52 return ret;
53}
Here is the caller graph for this function: