LLVM 24.0.0git
SharedMemoryMap.h
Go to the documentation of this file.
1//===- SharedMemoryMap.h - Shared-memory map bindings -----------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// A controller-side handle to an executor-side shared-memory mapper.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_EXECUTIONENGINE_ORC_SHAREDMEMORYMAP_H
14#define LLVM_EXECUTIONENGINE_ORC_SHAREDMEMORYMAP_H
15
18
19#include <cstdint>
20#include <string>
21#include <utility>
22
23namespace llvm::orc {
24
25/// The resolved controller-side handle to an executor-side shared-memory
26/// mapper: the address of the mapper instance, which is passed as the first
27/// argument to each call, plus the proxies for its operations.
28///
29/// This is the shared-memory analogue of SimpleMemoryMapBindings: reserve
30/// additionally returns the name of the shared-memory object backing the range
31/// (which the controller maps into its own address space), and initialize
32/// describes its segments by address and size, since their content is written
33/// directly into that shared region rather than shipped inline.
34///
35/// These are protocol-agnostic: sps::createSharedMemoryMapBindings populates
36/// them over the runtime's SPS controller interface, but a client targeting a
37/// different protocol -- or a different executor-side implementation of these
38/// operations -- can build its own and pass them to the utility that will use
39/// them.
41 /// Reserve an address range of the given size; returns its base together with
42 /// the name of the shared-memory object backing it, which the controller maps
43 /// into its own address space.
46
47 /// Apply a finalize request to the reservation with the given base; returns a
48 /// key for the initialized allocation.
51
52 /// Deinitialize the allocations with the given keys (running their
53 /// deallocation actions) without releasing their memory.
55
56 /// Release the reservations with the given base addresses.
58
64};
65
66} // namespace llvm::orc
67
68#endif // LLVM_EXECUTIONENGINE_ORC_SHAREDMEMORYMAP_H
unsigned uint64_t
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:40
Represents an address in the executor process.
The resolved controller-side handle to an executor-side shared-memory mapper: the address of the mapp...
Proxy< Expected< std::pair< ExecutorAddr, std::string > >( ExecutorAddr, uint64_t)> ReserveProxy
Reserve an address range of the given size; returns its base together with the name of the shared-mem...
Proxy< Error(ExecutorAddr, ArrayRef< ExecutorAddr >)> DeinitializeProxy
Deinitialize the allocations with the given keys (running their deallocation actions) without releasi...
Proxy< Expected< ExecutorAddr >( ExecutorAddr, ExecutorAddr, tpctypes::SharedMemoryFinalizeRequest)> InitializeProxy
Apply a finalize request to the reservation with the given base; returns a key for the initialized al...
Proxy< Error(ExecutorAddr, ArrayRef< ExecutorAddr >)> ReleaseProxy
Release the reservations with the given base addresses.