Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
DeviceInfoList.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 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/* DeviceInfoList.h (C) 2000-2022 */
9/* */
10/* Liste de devices. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_ACCELERATOR_CORE_DEVICEINFOLIST_H
13#define ARCANE_ACCELERATOR_CORE_DEVICEINFOLIST_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/Array.h"
18
19#include "arcane/accelerator/core/IDeviceInfoList.h"
20#include "arcane/accelerator/core/DeviceInfo.h"
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25namespace Arcane::Accelerator::impl
26{
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
33class ARCANE_ACCELERATOR_CORE_EXPORT DeviceInfoList
34: public IDeviceInfoList
35{
36 public:
37
39 Int32 nbDevice() const override { return m_devices.size(); }
40
42 const DeviceInfo& deviceInfo(Int32 i) const override { return m_devices[i]; }
43
44 public:
45
46 void addDevice(const DeviceInfo& d) { m_devices.add(d); }
47
48 private:
49
51};
52
53/*---------------------------------------------------------------------------*/
54/*---------------------------------------------------------------------------*/
55
56} // namespace Arcane::Accelerator::impl
57
58/*---------------------------------------------------------------------------*/
59/*---------------------------------------------------------------------------*/
60
61#endif
Information sur un device.
Definition DeviceInfo.h:32
Interface d'une liste de devices.
Interface d'une liste de devices.
Int32 nbDevice() const override
Nombre de device de la liste.
const DeviceInfo & deviceInfo(Int32 i) const override
Informations du i-ème device.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
std::int32_t Int32
Type entier signé sur 32 bits.