-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.h
More file actions
49 lines (37 loc) · 1.47 KB
/
project.h
File metadata and controls
49 lines (37 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef __PROJECT_H
#define __PROJECT_H
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <sys/time.h>
#include <upc.h>
#include <upc_cray.h>
#include <string.h>
#define NO_ALERT -1
typedef shared [] int * sintpt; // pointer to shared integer (if array, all on same thread)
typedef shared upc_lock_t * slockpt; // pointer to shared lock
void setup_spinlock();
void test_spinlock(shared int * data, shared strict volatile int *valid, int num_threads);
void cleanup_spinlock();
void setup_limited_directory(int max_dir_size);
void test_limited_directory(shared int * data, shared strict volatile int *valid, int num_threads, int dir_size);
void cleanup_limited_directory();
void setup_write_list();
void test_write_list(shared int * data, shared strict volatile int *valid, int num_threads);
void cleanup_write_list();
void setup_read_list();
void test_read_list(shared int * data, shared strict volatile int *valid, int num_threads);
void cleanup_read_list();
void setup_read_tree();
void test_read_tree(shared int * data, shared strict volatile int *valid, int num_threads);
void cleanup_read_tree();
void stats_spinlock(int num_threads);
void stats_write_list(int num_threads);
void stats_read_list(int num_threads);
void stats_read_tree(int num_threads);
int max( int a, int b );
int min( int a, int b );
int find_option( int argc, char **argv, const char *option );
int read_int( int argc, char **argv, const char *option, int default_value );
#endif