PAPI 7.1.0.0
Loading...
Searching...
No Matches
icache.h
Go to the documentation of this file.
1#ifndef _INSTR_CACHE_
2#define _INSTR_CACHE_
3
4#include <stdio.h>
5#include "hw_desc.h"
6
7#define NO_COPY 0
8#define DO_COPY 1
9
10#define FALSE_IF 0
11#define TRUE_IF 1
12
13#define COLD_RUN 0
14#define NORMAL_RUN 1
15
16#define BUF_ELEM_CNT 32*1024*1024 // Hopefully larger than the L3 cache.
17
18#define RNG() {\
19 b = ((z1 << 6) ^ z1) >> 13;\
20 z1 = ((z1 & 4294967294U) << 18) ^ b;\
21 b = ((z2 << 2) ^ z2) >> 27;\
22 z2 = ((z2 & 4294967288U) << 2) ^ b;\
23 b = ((z3 << 13) ^ z3) >> 21;\
24 z3 = ((z3 & 4294967280U) << 7) ^ b;\
25 b = ((z4 << 3) ^ z4) >> 12;\
26 z4 = ((z4 & 4294967168U) << 13) ^ b;\
27 b = ((z1 << 6) ^ z4) >> 13;\
28 z1 = ((z1 & 4294967294U) << 18) ^ b;\
29 b = ((z2 << 2) ^ z1) >> 27;\
30 b += z4;\
31 z2 = ((z2 & 4294967288U) << 2) ^ b;\
32 result = z1 ^ z2 ^ z3 ^ z4;\
33}
34
35void i_cache_driver(char* papi_event_name, int init, hw_desc_t *hw_desc, char* outdir, int show_progress);
36void seq_driver(FILE* ofp_papi, char* papi_event_name, int init, int show_progress);
37
38#endif
void seq_driver(FILE *ofp_papi, char *papi_event_name, int init, int show_progress)
void i_cache_driver(char *papi_event_name, int init, hw_desc_t *hw_desc, char *outdir, int show_progress)
Definition: icache.c:13