Hardware Locality (hwloc)  master-20230831.0905.git364652f8b
shmem.h
1 /*
2  * Copyright © 2013-2023 Inria. All rights reserved.
3  * See COPYING in top-level directory.
4  */
5 
10 #ifndef HWLOC_SHMEM_H
11 #define HWLOC_SHMEM_H
12 
13 #include "hwloc.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #elif 0
18 }
19 #endif
20 
21 
55 HWLOC_DECLSPEC int hwloc_shmem_topology_get_length(hwloc_topology_t topology,
56  size_t *lengthp,
57  unsigned long flags);
58 
85 HWLOC_DECLSPEC int hwloc_shmem_topology_write(hwloc_topology_t topology,
86  int fd, hwloc_uint64_t fileoffset,
87  void *mmap_address, size_t length,
88  unsigned long flags);
89 
133 HWLOC_DECLSPEC int hwloc_shmem_topology_adopt(hwloc_topology_t *topologyp,
134  int fd, hwloc_uint64_t fileoffset,
135  void *mmap_address, size_t length,
136  unsigned long flags);
140 #ifdef __cplusplus
141 } /* extern "C" */
142 #endif
143 
144 
145 #endif /* HWLOC_SHMEM_H */
int hwloc_shmem_topology_get_length(hwloc_topology_t topology, size_t *lengthp, unsigned long flags)
Get the required shared memory length for storing a topology.
int hwloc_shmem_topology_write(hwloc_topology_t topology, int fd, hwloc_uint64_t fileoffset, void *mmap_address, size_t length, unsigned long flags)
Duplicate a topology to a shared memory file.
struct hwloc_topology * hwloc_topology_t
Topology context.
Definition: hwloc.h:723
int hwloc_shmem_topology_adopt(hwloc_topology_t *topologyp, int fd, hwloc_uint64_t fileoffset, void *mmap_address, size_t length, unsigned long flags)
Adopt a shared memory topology stored in a file.