Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IMachineShMemWinBaseInternal.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* IMachineShMemWinBaseInternal.h (C) 2000-2026 */
9/* */
10/* Class interface allowing the creation of memory windows for a computing */
11/* node. */
12/* The segments of these windows are not contiguous in memory and can be */
13/* resized. */
14/*---------------------------------------------------------------------------*/
15#ifndef ARCCORE_MESSAGEPASSING_INTERNAL_IMACHINESHMEMWINBASEINTERNAL_H
16#define ARCCORE_MESSAGEPASSING_INTERNAL_IMACHINESHMEMWINBASEINTERNAL_H
17/*---------------------------------------------------------------------------*/
18/*---------------------------------------------------------------------------*/
19
21#include "arccore/collections/Array.h"
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
27{
28
29/*---------------------------------------------------------------------------*/
30/*---------------------------------------------------------------------------*/
31
49class ARCCORE_MESSAGEPASSING_EXPORT IMachineShMemWinBaseInternal
50{
51 public:
52
53 virtual ~IMachineShMemWinBaseInternal() = default;
54
55 public:
56
64 virtual Int32 sizeofOneElem() const = 0;
65
74
79 virtual void barrier() const = 0;
80
89
100
109
119
134 virtual void add(Span<const std::byte> elem) = 0;
135
139 virtual void add() = 0;
140
158 virtual void addToAnotherSegment(Int32 rank, Span<const std::byte> elem) = 0;
159
163 virtual void addToAnotherSegment() = 0;
164
185 virtual void reserve(Int64 new_capacity) = 0;
186
190 virtual void reserve() = 0;
191
206 virtual void resize(Int64 new_size) = 0;
207
211 virtual void resize() = 0;
212
219 virtual void shrink() = 0;
220};
221
222/*---------------------------------------------------------------------------*/
223/*---------------------------------------------------------------------------*/
224
225} // namespace Arcane::MessagePassing
226
227/*---------------------------------------------------------------------------*/
228/*---------------------------------------------------------------------------*/
229
230#endif
General declarations for the 'message_passing' component.
Constant view of an array of type T.
Class allowing the creation of memory windows for a computing node.
virtual ConstArrayView< Int32 > machineRanks() const =0
Method to get the ranks that possess a segment in the window.
virtual Span< const std::byte > segmentConstView() const =0
Method to get a view of our segment.
virtual Int32 sizeofOneElem() const =0
Method to get the size of an element in the window.
virtual void addToAnotherSegment(Int32 rank, Span< const std::byte > elem)=0
Method to add elements into the segment of another subdomain.
virtual void shrink()=0
Method to reduce the reserved memory space for the segments to the minimum necessary.
virtual void barrier() const =0
Method to wait until all processes/threads of the node call this method to continue execution.
virtual Span< std::byte > segmentView(Int32 rank)=0
Method to get a view of the segment of another subdomain of the node.
virtual Span< std::byte > segmentView()=0
Method to get a view of our segment.
virtual Span< const std::byte > segmentConstView(Int32 rank) const =0
Method to get a view of the segment of another subdomain of the node.
virtual void reserve(Int64 new_capacity)=0
Method to reserve memory space in our segment.
virtual void add(Span< const std::byte > elem)=0
Method to add elements into our segment.
virtual void resize(Int64 new_size)=0
Method to resize our segment.
View of an array of elements of type T.
Definition Span.h:635
Declarations of types and methods used by message exchange mechanisms.
std::int64_t Int64
Signed integer type of 64 bits.
std::int32_t Int32
Signed integer type of 32 bits.