Hardware Locality (hwloc)  PR-737-20250925.0822.gite8f69c77f
shmem.h
1 /*
2  * SPDX-License-Identifier: BSD-3-Clause
3  * Copyright © 2013-2023 Inria. All rights reserved.
4  * See COPYING in top-level directory.
5  */
6 
11 #ifndef HWLOC_SHMEM_H
12 #define HWLOC_SHMEM_H
13 
14 #include "hwloc.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #elif 0
19 }
20 #endif
21 
22 
56 HWLOC_DECLSPEC int hwloc_shmem_topology_get_length(hwloc_topology_t topology,
57  size_t *lengthp,
58  unsigned long flags);
59 
86 HWLOC_DECLSPEC int hwloc_shmem_topology_write(hwloc_topology_t topology,
87  int fd, hwloc_uint64_t fileoffset,
88  void *mmap_address, size_t length,
89  unsigned long flags);
90 
134 HWLOC_DECLSPEC int hwloc_shmem_topology_adopt(hwloc_topology_t *topologyp,
135  int fd, hwloc_uint64_t fileoffset,
136  void *mmap_address, size_t length,
137  unsigned long flags);
141 #ifdef __cplusplus
142 } /* extern "C" */
143 #endif
144 
145 
146 #endif /* HWLOC_SHMEM_H */
hwloc_topology_t
struct hwloc_topology * hwloc_topology_t
Topology context.
Definition: hwloc.h:778
hwloc_shmem_topology_adopt
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.
hwloc_shmem_topology_write
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.
hwloc_shmem_topology_get_length
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.