Arcane  v3.15.3.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
MemoryAllocationArgs.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2024 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/* MemoryAllocationArgs.h (C) 2000-2024 */
9/* */
10/* Arguments des méthodes de IMemoryAllocator. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_COLLECTIONS_MEMORYALLOCATIONARGS_H
13#define ARCCORE_COLLECTIONS_MEMORYALLOCATIONARGS_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arccore/collections/MemoryAllocationOptions.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arccore
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27/*!
28 * \brief Classe contenant des informations pour spécialiser les allocations.
29 */
30class ARCCORE_COLLECTIONS_EXPORT MemoryAllocationArgs
31{
32 public:
33
34 void setMemoryLocationHint(eMemoryLocationHint mem_advice) { m_memory_location_hint = mem_advice; }
35 eMemoryLocationHint memoryLocationHint() const { return m_memory_location_hint; }
36
37 void setHostDeviceMemoryLocation(eHostDeviceMemoryLocation v) { m_host_device_memory_location = v; }
38 eHostDeviceMemoryLocation hostDeviceMemoryLocation() const { return m_host_device_memory_location; }
39
40 Int16 device() const { return m_device; }
41 void setDevice(Int16 device) { m_device = device; }
42
43 ArrayDebugInfo* debugInfo() const { return m_debug_info; }
44 void setDebugInfo(ArrayDebugInfo* v) { m_debug_info = v; }
45
46 // RunQueue associée à l'allocation. Peut-être nulle.
47 RunQueue* runQueue() const { return m_run_queue; }
48 void setRunQueue(RunQueue* v) { m_run_queue = v; }
49
50 String arrayName() const;
51
52 private:
53
54 eMemoryLocationHint m_memory_location_hint = eMemoryLocationHint::None;
55 eHostDeviceMemoryLocation m_host_device_memory_location = eHostDeviceMemoryLocation::Unknown;
56 Int16 m_device = (-1);
57 RunQueue* m_run_queue = nullptr;
58 ArrayDebugInfo* m_debug_info = nullptr;
59};
60
61/*---------------------------------------------------------------------------*/
62/*---------------------------------------------------------------------------*/
63
64} // namespace Arccore
65
66/*---------------------------------------------------------------------------*/
67/*---------------------------------------------------------------------------*/
68
69#endif
File d'exécution pour un accélérateur.
Informations de debug pour les classes tableaux.
Classe contenant des informations pour spécialiser les allocations.
Référence à une instance.
Chaîne de caractères unicode.
Espace de nom de Arccore.
Definition ArcaneTypes.h:29
eHostDeviceMemoryLocation
Localisation physique d'une adresse mémoire.
eMemoryLocationHint
Indices sur la localisation mémoire attendue.
std::int16_t Int16
Type entier signé sur 16 bits.