Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
MemoryAccessInfo.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/* MemoryAccessInfo.h (C) 2000-2006 */
9/* */
10/* Information about a memory access. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_UTILS_MEMORYACCESSINFO_H
13#define ARCANE_UTILS_MEMORYACCESSINFO_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/Numeric.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29enum eMemoryAccessMessage
30{
31 MAM_UnitializedMemoryRead,
32 MAM_MayBeUnitializedMemoryRead,
33 MAM_NotSyncRead
34};
35
36/*---------------------------------------------------------------------------*/
37/*---------------------------------------------------------------------------*/
38
39class ARCANE_UTILS_EXPORT IMemoryAccessTrace
40{
41 public:
42
43 virtual ~IMemoryAccessTrace() {}
44
45 public:
46
47 virtual void notify(eMemoryAccessMessage message, Integer handle) = 0;
48};
49
50/*---------------------------------------------------------------------------*/
51/*---------------------------------------------------------------------------*/
52
53class ARCANE_UTILS_EXPORT MemoryAccessInfo
54{
55 public:
56
57 MemoryAccessInfo(Byte* info, IMemoryAccessTrace* trace, Integer handle)
58 : m_info(info)
59 , m_trace(trace)
60 , m_handle(handle)
61 {}
62 MemoryAccessInfo(const MemoryAccessInfo& rhs)
63 : m_info(rhs.m_info)
64 , m_trace(rhs.m_trace)
65 , m_handle(rhs.m_handle)
66 {}
67
68 public:
69
70 void setRead() const;
71 void setWrite() const;
72 void setWriteAndSync() const;
73 void setSync() const;
74 void setNeedSync(bool) const;
75 void setReadOrWrite() const;
76 void setCreate() const;
77
78 private:
79
80 Byte* m_info;
81 IMemoryAccessTrace* m_trace;
82 Integer m_handle;
83};
84
85/*---------------------------------------------------------------------------*/
86/*---------------------------------------------------------------------------*/
87
88} // namespace Arcane
89
90/*---------------------------------------------------------------------------*/
91/*---------------------------------------------------------------------------*/
92
93#endif
Declarations of types used in Arcane.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
unsigned char Byte
Type of a byte.
Definition BaseTypes.h:43