Go to the source code of this file.
◆ _DO_STUFF()
◆ _DUMMY()
void _DUMMY |
( |
void * |
array | ) |
|
Definition at line 333 of file do_loops.c.
334{
336}
static double array[ARRAYSIZE]
◆ _FDO_FLOPS()
void _FDO_FLOPS |
( |
int * |
n | ) |
|
◆ _FDO_FLUSH()
◆ _FDO_L1MISSES()
void _FDO_L1MISSES |
( |
int * |
n | ) |
|
◆ _FDO_MISSES()
void _FDO_MISSES |
( |
int * |
n, |
|
|
int * |
size |
|
) |
| |
Definition at line 166 of file do_loops.c.
167{
169}
void do_misses(int n, int bytes)
◆ _FDO_READS()
void _FDO_READS |
( |
int * |
n | ) |
|
◆ do_flops()
Definition at line 78 of file do_loops.c.
79{
82
83 for (
i = 0;
i < n;
i++ ) {
85 }
87}
static double c[MATRIX_SIZE][MATRIX_SIZE]
◆ do_flush()
Definition at line 172 of file do_loops.c.
173{
176 flush = (
int * ) malloc( ( 1024 * 1024 * 16 ) *
sizeof (
int ) );
178 return;
179
181 for (
i = 0;
i < ( 1024 * 1024 * 16 );
i++ ) {
183 }
187}
◆ do_l1misses()
void do_l1misses |
( |
int |
n | ) |
|
Definition at line 220 of file do_loops.c.
221{
223}
#define L1_MISS_BUFFER_SIZE_INTS
◆ do_misses()
void do_misses |
( |
int |
n, |
|
|
int |
bytes |
|
) |
| |
Definition at line 120 of file do_loops.c.
121{
126 for ( j = 0; j < n; j++ ) {
127 for (
i = 0;
i < len;
i++ ) {
128
129
131
133 }
135 }
139}
volatile int buf[CACHE_FLUSH_BUFFER_SIZE_INTS]
#define CACHE_FLUSH_BUFFER_SIZE_INTS
◆ do_reads()
Definition at line 19 of file do_loops.c.
20{
22 static int fd = -1;
24
25 if ( fd == -1 ) {
26 fd =
open(
"/dev/zero", O_RDONLY );
27 if ( fd == -1 ) {
28 perror( "open(/dev/zero)" );
29 exit( 1 );
30 }
31 }
32
33 for (
i = 0;
i < n;
i++ ) {
37 perror( "/dev/zero cannot be read" );
38 else
40 "/dev/zero cannot be read: only got %d bytes.\n",
42 exit( 1 );
43 }
44 }
45}
int open(const char *pathname, int flags, mode_t mode)
ssize_t read(int fd, void *buf, size_t count)
◆ do_stuff()
Definition at line 256 of file do_loops.c.
257{
258 static int loops = 0;
259
260 if ( loops == 0 ) {
262 gettimeofday( &then, NULL );
263 do {
267 gettimeofday( &now, NULL );
268 loops++;
270 } else {
272 do {
277 }
while (
i < loops );
278 }
279}
◆ DO_STUFF()
◆ do_stuff_()
◆ do_stuff__()
◆ dummy()
void dummy |
( |
void * |
array | ) |
|
◆ DUMMY()
void DUMMY |
( |
void * |
array | ) |
|
◆ dummy_()
void dummy_ |
( |
void * |
array | ) |
|
◆ dummy__()
void dummy__ |
( |
void * |
array | ) |
|
◆ fdo_flops()
void fdo_flops |
( |
int * |
n | ) |
|
◆ FDO_FLOPS()
void FDO_FLOPS |
( |
int * |
n | ) |
|
◆ fdo_flops_()
void fdo_flops_ |
( |
int * |
n | ) |
|
◆ fdo_flops__()
void fdo_flops__ |
( |
int * |
n | ) |
|
◆ fdo_flush()
◆ FDO_FLUSH()
◆ fdo_flush_()
◆ fdo_flush__()
void fdo_flush__ |
( |
void |
| ) |
|
◆ fdo_l1misses()
void fdo_l1misses |
( |
int * |
n | ) |
|
◆ FDO_L1MISSES()
void FDO_L1MISSES |
( |
int * |
n | ) |
|
◆ fdo_l1misses_()
void fdo_l1misses_ |
( |
int * |
n | ) |
|
◆ fdo_l1misses__()
void fdo_l1misses__ |
( |
int * |
n | ) |
|
◆ fdo_misses()
void fdo_misses |
( |
int * |
n, |
|
|
int * |
size |
|
) |
| |
◆ FDO_MISSES()
void FDO_MISSES |
( |
int * |
n, |
|
|
int * |
size |
|
) |
| |
◆ fdo_misses_()
void fdo_misses_ |
( |
int * |
n, |
|
|
int * |
size |
|
) |
| |
◆ fdo_misses__()
void fdo_misses__ |
( |
int * |
n, |
|
|
int * |
size |
|
) |
| |
◆ fdo_reads()
void fdo_reads |
( |
int * |
n | ) |
|
◆ FDO_READS()
void FDO_READS |
( |
int * |
n | ) |
|
◆ fdo_reads_()
void fdo_reads_ |
( |
int * |
n | ) |
|
◆ fdo_reads__()
void fdo_reads__ |
( |
int * |
n | ) |
|
◆ touch_dummy()
void touch_dummy |
( |
double * |
array, |
|
|
int |
size |
|
) |
| |
Definition at line 343 of file do_loops.c.
344{
347 for (
i = 0;
i < size;
i++,
tmp++ )
348 *
tmp = (
double ) rand( );
349}
◆ buf
◆ buf_dummy
volatile int buf_dummy = 0 |
◆ flush
volatile int* flush = NULL |
◆ flush_dummy
volatile int flush_dummy = 0 |