-
Notifications
You must be signed in to change notification settings - Fork 2
/
server.h
48 lines (37 loc) · 815 Bytes
/
server.h
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
#ifndef _SERVER_H_
#define _SERVER_H_
#define READER_TYPE 0
#define WRITER_TYPE 1
#define DATA_PARTICLES 0
#define DATA_BPARTICLES 1
#define DATA_HALOS 2
#define DATA_HPARTICLES 3
#include <stdint.h>
struct client_info {
int type;
int64_t cs;
char *address, *serv_port;
int port;
float bounds[6];
float halo_bounds[6];
float bounds_prevsnap[6];
int64_t num_halos;
int64_t status;
int64_t workers;
int64_t head_length;
int64_t cat_length;
};
#define PROJECTION_SIZE 10000
struct projection_request {
int64_t dir, id;
float bounds[6];
};
struct projection {
int64_t dir, id;
float bounds[6];
int64_t data[PROJECTION_SIZE];
};
int server(void);
void check_num_writers(void);
#define timed_output(...) { print_time(); fprintf(stderr, __VA_ARGS__); }
#endif /* _SERVER_H_ */