Arcane  v3.14.10.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 Int16 device() const { return m_device; }
38 void setDevice(Int16 device) { m_device = device; }
39
40 ArrayDebugInfo* debugInfo() const { return m_debug_info; }
41 void setDebugInfo(ArrayDebugInfo* v) { m_debug_info = v; }
42
43 // RunQueue associée à l'allocation. Peut-être nulle.
44 RunQueue* runQueue() const { return m_run_queue; }
45 void setRunQueue(RunQueue* v) { m_run_queue = v; }
46
47 String arrayName() const;
48
49 private:
50
51 eMemoryLocationHint m_memory_location_hint = eMemoryLocationHint::None;
52 Int16 m_device = (-1);
53 RunQueue* m_run_queue = nullptr;
54 ArrayDebugInfo* m_debug_info = nullptr;
55};
56
57/*---------------------------------------------------------------------------*/
58/*---------------------------------------------------------------------------*/
59
60} // namespace Arccore
61
62/*---------------------------------------------------------------------------*/
63/*---------------------------------------------------------------------------*/
64
65#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.
Chaîne de caractères unicode.
Espace de nom de Arccore.
Definition ArcaneTypes.h:24
eMemoryLocationHint
Indices sur la localisation mémoire attendue.
std::int16_t Int16
Type entier signé sur 16 bits.