-
Notifications
You must be signed in to change notification settings - Fork 0
/
graph_shared.h
35 lines (24 loc) · 756 Bytes
/
graph_shared.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
#ifndef GRAPH_SHARED_H
#define GRAPH_SHARED_H
#include "defs.h"
#define MAX_NAME_LEN 256
struct graph_shared {
int64_t numEdges;
int64_t numVertices;
char startVertex[2*MAX_NAME_LEN];
size_t map_size;
int64_t undirected;
};
void *
shmmap (char * name, int oflags, mode_t mode, int prot, size_t size);
int
shmunmap (char * name, void * ptr, size_t size);
void
graph_shared_new (graph * localG, struct graph_shared ** shared, char ** name, char * filename, int64_t mode);
void
graph_shared_map (graph * G, struct graph_shared ** shared, char * name);
void
graph_shared_free (graph *G, struct graph_shared * shared, char * name);
void
graph_shared_unmap (graph *G, struct graph_shared * shared, char * name);
#endif /*GRAPH_SHARED_H*/