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

Go to the source code of this file.

Macros

#define NO_COPY   0
 
#define DO_COPY   1
 
#define FALSE_IF   0
 
#define TRUE_IF   1
 
#define COLD_RUN   0
 
#define NORMAL_RUN   1
 
#define BUF_ELEM_CNT   32*1024*1024
 
#define RNG()
 

Functions

void i_cache_driver (char *papi_event_name, int init, hw_desc_t *hw_desc, char *outdir, int show_progress)
 
void seq_driver (FILE *ofp_papi, char *papi_event_name, int init, int show_progress)
 

Macro Definition Documentation

◆ BUF_ELEM_CNT

#define BUF_ELEM_CNT   32*1024*1024

Definition at line 16 of file icache.h.

◆ COLD_RUN

#define COLD_RUN   0

Definition at line 13 of file icache.h.

◆ DO_COPY

#define DO_COPY   1

Definition at line 8 of file icache.h.

◆ FALSE_IF

#define FALSE_IF   0

Definition at line 10 of file icache.h.

◆ NO_COPY

#define NO_COPY   0

Definition at line 7 of file icache.h.

◆ NORMAL_RUN

#define NORMAL_RUN   1

Definition at line 14 of file icache.h.

◆ RNG

#define RNG ( )
Value:
{\
b = ((z1 << 6) ^ z1) >> 13;\
z1 = ((z1 & 4294967294U) << 18) ^ b;\
b = ((z2 << 2) ^ z2) >> 27;\
z2 = ((z2 & 4294967288U) << 2) ^ b;\
b = ((z3 << 13) ^ z3) >> 21;\
z3 = ((z3 & 4294967280U) << 7) ^ b;\
b = ((z4 << 3) ^ z4) >> 12;\
z4 = ((z4 & 4294967168U) << 13) ^ b;\
b = ((z1 << 6) ^ z4) >> 13;\
z1 = ((z1 & 4294967294U) << 18) ^ b;\
b = ((z2 << 2) ^ z1) >> 27;\
b += z4;\
z2 = ((z2 & 4294967288U) << 2) ^ b;\
result = z1 ^ z2 ^ z3 ^ z4;\
}
volatile int result
volatile unsigned int z1
volatile unsigned int z2
volatile unsigned int z3
volatile unsigned int z4
static double b[MATRIX_SIZE][MATRIX_SIZE]
Definition: libmsr_basic.c:39

Definition at line 18 of file icache.h.

◆ TRUE_IF

#define TRUE_IF   1

Definition at line 11 of file icache.h.

Function Documentation

◆ i_cache_driver()

void i_cache_driver ( char *  papi_event_name,
int  init,
hw_desc_t hw_desc,
char *  outdir,
int  show_progress 
)

Definition at line 13 of file icache.c.

14{
15 // Open output file.
16 const char *sufx = ".icache";
17 char *papiFileName;
18 FILE *ofp_papi;
19
20 (void)hw_desc;
21
22 int l = strlen(outdir)+strlen(papi_event_name)+strlen(sufx);
23 if (NULL == (papiFileName = (char *)calloc( 1+l, sizeof(char) ))) {
24 fprintf(stderr, "Failed to allocate papiFileName.\n");
25 return;
26 }
27 if (l != (sprintf(papiFileName, "%s%s%s", outdir, papi_event_name, sufx))) {
28 fprintf(stderr, "sprintf failed to copy into papiFileName.\n");
29 free(papiFileName);
30 return;
31 }
32 if (NULL == (ofp_papi = fopen(papiFileName,"w"))) {
33 fprintf(stderr, "Failed to open file %s.\n", papiFileName);
34 free(papiFileName);
35 return;
36 }
37
38 seq_driver(ofp_papi, papi_event_name, junk, show_progress);
39
40 // Close output file.
41 fclose(ofp_papi);
42 free(papiFileName);
43
44 return;
45}
void seq_driver(FILE *ofp_papi, char *papi_event_name, int init, int show_progress)
FILE * stderr
int fclose(FILE *__stream)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ seq_driver()

void seq_driver ( FILE *  ofp_papi,
char *  papi_event_name,
int  init,
int  show_progress 
)
Here is the caller graph for this function: