Arcane  v4.1.1.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
RunCommandMaterialEnumerate.h
Aller à la documentation de ce fichier.
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2025 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/* RunCommandMaterialEnumerate.h (C) 2000-2025 */
9/* */
10/* Exécution d'une boucle sur une liste de constituants. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_ACCELERATOR_RUNCOMMANDMATERIALENUMERATE_H
13#define ARCANE_ACCELERATOR_RUNCOMMANDMATERIALENUMERATE_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18#include "arcane/core/materials/ComponentItemVectorView.h"
19#include "arcane/core/materials/MaterialsCoreGlobal.h"
20#include "arcane/core/materials/MatItem.h"
22
23#include "arcane/accelerator/KernelLauncher.h"
24#include "arcane/accelerator/RunCommand.h"
25#include "arcane/accelerator/RunCommandLaunchInfo.h"
26
27#include "arccore/common/HostKernelRemainingArgsHelper.h"
28
29/*---------------------------------------------------------------------------*/
30/*---------------------------------------------------------------------------*/
31
33{
34
35/*---------------------------------------------------------------------------*/
36/*---------------------------------------------------------------------------*/
44template <typename ConstituentItemLocalIdType_>
45class ConstituentAndGlobalCellIteratorValue
46{
47 public:
48
49 using ConstituentItemLocalIdType = ConstituentItemLocalIdType_;
50 using ComponentItemLocalId = Arcane::Materials::ComponentItemLocalId;
51 using MatVarIndex = Arcane::Materials::MatVarIndex;
52
53 public:
54
56 struct Data
57 {
58 public:
59
60 constexpr ARCCORE_HOST_DEVICE Data(ConstituentItemLocalIdType mvi, CellLocalId cid)
61 : m_mvi(mvi)
62 , m_cid(cid)
63 {}
64
65 public:
66
67 ConstituentItemLocalIdType m_mvi;
68 CellLocalId m_cid;
69 };
70
71 public:
72
73 constexpr ARCCORE_HOST_DEVICE ConstituentAndGlobalCellIteratorValue(ConstituentItemLocalIdType mvi, CellLocalId cid, Int32 index)
74 : m_internal_data{ mvi, cid }
75 , m_index(index)
76 {
77 }
78
97 constexpr ARCCORE_HOST_DEVICE Data operator()()
98 {
99 return m_internal_data;
100 }
101
103 constexpr ARCCORE_HOST_DEVICE ConstituentItemLocalIdType varIndex() const { return m_internal_data.m_mvi; };
104
106 constexpr ARCCORE_HOST_DEVICE CellLocalId globalCellId() const { return m_internal_data.m_cid; }
107
109 constexpr ARCCORE_HOST_DEVICE Int32 index() const { return m_index; }
110
111 private:
112
113 Data m_internal_data;
114 Int32 m_index = -1;
115};
116
119
122
123/*---------------------------------------------------------------------------*/
124/*---------------------------------------------------------------------------*/
125
126} // namespace Arcane::Materials
127
128/*---------------------------------------------------------------------------*/
129/*---------------------------------------------------------------------------*/
130
131namespace Arcane::Accelerator::impl
132{
133
134/*---------------------------------------------------------------------------*/
135/*---------------------------------------------------------------------------*/
139class AllEnvCellRunCommand
140{
141 using AllEnvCellVectorView = Arcane::Materials::AllEnvCellVectorView;
142
143 public:
144
145 using IteratorValueType = Arcane::Materials::AllEnvCell;
146 using ContainerCreateViewType = AllEnvCellVectorView;
147
148 public:
149
153 class Container
154 {
155 public:
156
157 explicit Container(ContainerCreateViewType view)
158 : m_view(view)
159 {
160 }
161
162 public:
163 public:
164
165 constexpr ARCCORE_HOST_DEVICE Int32 size() const { return m_view.size(); }
166
168 ARCCORE_HOST_DEVICE IteratorValueType operator[](Int32 i) const
169 {
170 return m_view[i];
171 }
172
173 private:
174
175 AllEnvCellVectorView m_view;
176 };
177
178 public:
179
180 static AllEnvCellRunCommand create(RunCommand& run_command, const Container& items)
181 {
182 return AllEnvCellRunCommand(run_command, items);
183 }
184
185 private:
186
187 // Uniquement appelable depuis 'Container'
188 explicit AllEnvCellRunCommand(RunCommand& command, const Container& items)
189 : m_command(command)
190 , m_items(items)
191 {
192 }
193
194 public:
195
196 RunCommand& m_command;
197 Container m_items;
198};
199
200/*---------------------------------------------------------------------------*/
201/*---------------------------------------------------------------------------*/
202
203class ConstituentCommandContainerBase
204{
205 protected:
206
207 using ComponentItemVectorView = Arcane::Materials::ComponentItemVectorView;
208 using ComponentItemLocalId = Arcane::Materials::ComponentItemLocalId;
209 using MatVarIndex = Arcane::Materials::MatVarIndex;
210
211 protected:
212
213 explicit ConstituentCommandContainerBase(ComponentItemVectorView view)
214 : m_items(view)
215 {
216 m_nb_item = m_items.nbItem();
217 m_matvar_indexes = m_items._matvarIndexes();
218 m_global_cells_local_id = m_items._internalLocalIds();
219 }
220
221 public:
222
223 constexpr ARCCORE_HOST_DEVICE Int32 size() const { return m_nb_item; }
224
225 protected:
226
227 ComponentItemVectorView m_items;
228 SmallSpan<const MatVarIndex> m_matvar_indexes;
229 SmallSpan<const Int32> m_global_cells_local_id;
230 Int32 m_nb_item = 0;
231};
232
233/*---------------------------------------------------------------------------*/
234/*---------------------------------------------------------------------------*/
238template <typename ConstituentItemLocalIdType_, typename ContainerCreateViewType_>
239class ConstituentRunCommandBase
240{
241 public:
242
243 using ThatClass = ConstituentRunCommandBase<ConstituentItemLocalIdType_, ContainerCreateViewType_>;
244 using CommandType = ThatClass;
245 using IteratorValueType = ConstituentItemLocalIdType_;
246 using ContainerCreateViewType = ContainerCreateViewType_;
247
248 public:
249
253 class Container
255 {
256 public:
257
258 explicit Container(ContainerCreateViewType view)
260 {
261 }
262
263 public:
264
266 constexpr ARCCORE_HOST_DEVICE IteratorValueType operator[](Int32 i) const
267 {
268 return { ComponentItemLocalId(m_matvar_indexes[i]) };
269 }
270 };
271
272 public:
273
274 static CommandType create(RunCommand& run_command, const Container& items)
275 {
276 return CommandType(run_command, items);
277 }
278
279 private:
280
281 // Uniquement appelable depuis 'Container'
282 explicit ConstituentRunCommandBase(RunCommand& command, const Container& items)
283 : m_command(command)
284 , m_items(items)
285 {
286 }
287
288 public:
289
290 RunCommand& m_command;
291 Container m_items;
292};
293
294using EnvCellRunCommand = ConstituentRunCommandBase<Arcane::Materials::EnvItemLocalId, Arcane::Materials::EnvCellVectorView>;
295using MatCellRunCommand = ConstituentRunCommandBase<Arcane::Materials::MatItemLocalId, Arcane::Materials::MatCellVectorView>;
296
297/*---------------------------------------------------------------------------*/
298/*---------------------------------------------------------------------------*/
302template <typename ConstituentItemLocalIdType_, typename ContainerCreateViewType_>
303class ConstituentAndGlobalCellRunCommandBase
304{
305 public:
306
307 using ThatClass = ConstituentAndGlobalCellRunCommandBase<ConstituentItemLocalIdType_, ContainerCreateViewType_>;
308 using CommandType = ThatClass;
310 using ContainerCreateViewType = ContainerCreateViewType_;
311
312 public:
313
317 class Container
319 {
320 public:
321
322 explicit Container(ContainerCreateViewType view)
324 {
325 }
326
327 public:
328
330 constexpr ARCCORE_HOST_DEVICE IteratorValueType operator[](Int32 i) const
331 {
332 return { ComponentItemLocalId(m_matvar_indexes[i]), CellLocalId(m_global_cells_local_id[i]), i };
333 }
334 };
335
336 public:
337
338 static CommandType create(RunCommand& run_command, const Container& items)
339 {
340 return CommandType(run_command, items);
341 }
342
343 private:
344
345 // Uniquement appelable depuis 'Container'
346 explicit ConstituentAndGlobalCellRunCommandBase(RunCommand& command, const Container& items)
347 : m_command(command)
348 , m_items(items)
349 {
350 }
351
352 public:
353
354 RunCommand& m_command;
355 Container m_items;
356};
357
358/*---------------------------------------------------------------------------*/
359/*---------------------------------------------------------------------------*/
360
361using EnvAndGlobalCellRunCommand = ConstituentAndGlobalCellRunCommandBase<Arcane::Materials::EnvItemLocalId, Arcane::Materials::EnvCellVectorView>;
362using MatAndGlobalCellRunCommand = ConstituentAndGlobalCellRunCommandBase<Arcane::Materials::MatItemLocalId, Arcane::Materials::MatCellVectorView>;
363
364/*---------------------------------------------------------------------------*/
365/*---------------------------------------------------------------------------*/
366
367/*---------------------------------------------------------------------------*/
368/*---------------------------------------------------------------------------*/
378template <typename MatItemType>
380
381/*---------------------------------------------------------------------------*/
382/*---------------------------------------------------------------------------*/
386template <typename CommandType_>
388{
389 public:
390
391 using CommandType = CommandType_;
392 using IteratorValueType = CommandType::IteratorValueType;
393 using ContainerType = CommandType::Container;
394 using ContainerCreateViewType = CommandType::ContainerCreateViewType;
395
396 public:
397
398 static ContainerType createContainer(const ContainerCreateViewType& items)
399 {
400 return ContainerType{ items };
401 }
402};
403
404/*---------------------------------------------------------------------------*/
405/*---------------------------------------------------------------------------*/
406
408template <>
410: public RunCommandConstituentItemTraitsBaseT<EnvAndGlobalCellRunCommand>
411{
412 public:
413
415 using BaseClass::createContainer;
416
417 static ContainerType createContainer(Arcane::Materials::IMeshEnvironment* env)
418 {
419 return ContainerType{ env->envView() };
420 }
421};
422
423/*---------------------------------------------------------------------------*/
424/*---------------------------------------------------------------------------*/
425
427template <>
429: public RunCommandConstituentItemTraitsBaseT<MatAndGlobalCellRunCommand>
430{
431 public:
432
434 using BaseClass::createContainer;
435
436 static ContainerType createContainer(Arcane::Materials::IMeshMaterial* mat)
437 {
438 return ContainerType{ mat->matView() };
439 }
440};
441
442/*---------------------------------------------------------------------------*/
443/*---------------------------------------------------------------------------*/
444
446template <>
451
452/*---------------------------------------------------------------------------*/
453/*---------------------------------------------------------------------------*/
454
456template <>
458: public RunCommandConstituentItemTraitsBaseT<EnvCellRunCommand>
459{
460 public:
461
463 using BaseClass::createContainer;
464
465 public:
466
467 static ContainerType createContainer(Arcane::Materials::IMeshEnvironment* env)
468 {
469 return ContainerType(env->envView());
470 }
471};
472
473/*---------------------------------------------------------------------------*/
474/*---------------------------------------------------------------------------*/
475
477template <>
479: public RunCommandConstituentItemTraitsBaseT<MatCellRunCommand>
480{
481 public:
482
484 using BaseClass::createContainer;
485
486 static ContainerType createContainer(Arcane::Materials::IMeshMaterial* mat)
487 {
488 return ContainerType(mat->matView());
489 }
490};
491
492/*---------------------------------------------------------------------------*/
493/*---------------------------------------------------------------------------*/
494
495#if defined(ARCANE_COMPILING_CUDA_OR_HIP)
496/*
497 * Surcharge de la fonction de lancement de kernel pour GPU pour les ComponentItemLocalId et CellLocalId
498 */
499template <typename ContainerType, typename Lambda, typename... RemainingArgs> __global__ void
500doMatContainerGPULambda(ContainerType items, Lambda func, RemainingArgs... remaining_args)
501{
502 auto privatizer = Impl::privatize(func);
503 auto& body = privatizer.privateCopy();
504 Int32 i = blockDim.x * blockIdx.x + threadIdx.x;
506 if (i < items.size()) {
507 body(items[i], remaining_args...);
508 }
510}
511
512#endif // ARCANE_COMPILING_CUDA_OR_HIP
513
514/*---------------------------------------------------------------------------*/
515/*---------------------------------------------------------------------------*/
516
517#if defined(ARCANE_COMPILING_SYCL)
518
519template <typename ContainerType, typename Lambda, typename... RemainingArgs>
520class DoMatContainerSYCLLambda
521{
522 public:
523
524 void operator()(sycl::nd_item<1> x, SmallSpan<std::byte> shm_view,
525 ContainerType items, Lambda func,
526 RemainingArgs... remaining_args) const
527 {
528 auto privatizer = Impl::privatize(func);
529 auto& body = privatizer.privateCopy();
530
531 Int32 i = static_cast<Int32>(x.get_global_id(0));
532 Impl::SyclKernelRemainingArgsHelper::applyAtBegin(x, shm_view, remaining_args...);
533 if (i < items.size()) {
534 body(items[i], remaining_args...);
535 }
536 Impl::SyclKernelRemainingArgsHelper::applyAtEnd(x, shm_view, remaining_args...);
537 }
538
539 void operator()(sycl::id<1> x, ContainerType items, Lambda func) const
540 {
541 auto privatizer = Impl::privatize(func);
542 auto& body = privatizer.privateCopy();
543
544 Int32 i = static_cast<Int32>(x);
545 if (i < items.size()) {
546 body(items[i]);
547 }
548 }
549};
550
551#endif
552
553/*---------------------------------------------------------------------------*/
554/*---------------------------------------------------------------------------*/
555
556template <typename ContainerType, typename Lambda, typename... RemainingArgs>
557void _doConstituentItemsLambda(Int32 base_index, Int32 size, ContainerType items,
558 const Lambda& func, RemainingArgs... remaining_args)
559{
560 auto privatizer = Impl::privatize(func);
561 auto& body = privatizer.privateCopy();
562
564 Int32 last_value = base_index + size;
565 for (Int32 i = base_index; i < last_value; ++i) {
566 body(items[i], remaining_args...);
567 }
569}
570
571/*---------------------------------------------------------------------------*/
572/*---------------------------------------------------------------------------*/
573
574template <typename TraitsType, typename... RemainingArgs>
575class GenericConstituentCommandArgs
576{
577 public:
578
579 using ContainerType = typename TraitsType::ContainerType;
580
581 public:
582
583 explicit GenericConstituentCommandArgs(const ContainerType& container, const RemainingArgs&... remaining_args)
584 : m_container(container)
585 , m_remaining_args(remaining_args...)
586 {}
587
588 public:
589
590 ContainerType m_container;
591 std::tuple<RemainingArgs...> m_remaining_args;
592};
593
594/*---------------------------------------------------------------------------*/
595/*---------------------------------------------------------------------------*/
596
597template <typename ConstituentCommandType, typename... RemainingArgs>
598class GenericConstituentCommand
599{
600 public:
601
602 using ContainerType = typename ConstituentCommandType::Container;
603
604 public:
605
606 explicit GenericConstituentCommand(const ConstituentCommandType& command)
607 : m_command(command)
608 {}
609 explicit GenericConstituentCommand(const ConstituentCommandType& command, const std::tuple<RemainingArgs...>& remaining_args)
610 : m_command(command)
611 , m_remaining_args(remaining_args)
612 {}
613
614 public:
615
616 ConstituentCommandType m_command;
617 std::tuple<RemainingArgs...> m_remaining_args;
618};
619
620/*---------------------------------------------------------------------------*/
621/*---------------------------------------------------------------------------*/
631template <typename ContainerType, typename Lambda, typename... RemainingArgs> void
632_applyConstituentCells(RunCommand& command, ContainerType items, const Lambda& func, const RemainingArgs&... remaining_args)
633{
634 using namespace Arcane::Materials;
635 // TODO: fusionner la partie commune avec 'applyLoop'
636 Int32 vsize = items.size();
637 if (vsize == 0)
638 return;
639
640 Impl::RunCommandLaunchInfo launch_info(command, vsize);
641 const eExecutionPolicy exec_policy = launch_info.executionPolicy();
642 launch_info.beginExecute();
643 switch (exec_policy) {
645 ARCCORE_KERNEL_CUDA_FUNC((doMatContainerGPULambda < ContainerType, Lambda, RemainingArgs... >),
646 launch_info, func, items, remaining_args...);
647 break;
649 ARCCORE_KERNEL_HIP_FUNC((doMatContainerGPULambda < ContainerType, Lambda, RemainingArgs... >),
650 launch_info, func, items, remaining_args...);
651 break;
653 ARCCORE_KERNEL_SYCL_FUNC((impl::DoMatContainerSYCLLambda < ContainerType, Lambda, RemainingArgs... > {}),
654 launch_info, func, items, remaining_args...);
655 break;
657 _doConstituentItemsLambda(0, vsize, items, func, remaining_args...);
658 break;
660 arcaneParallelFor(0, vsize, launch_info.loopRunInfo(),
661 [&](Int32 begin, Int32 size) {
662 _doConstituentItemsLambda(begin, size, items, func, remaining_args...);
663 });
664 break;
665 default:
666 ARCCORE_FATAL("Invalid execution policy '{0}'", exec_policy);
667 }
668 launch_info.endExecute();
669}
670/*---------------------------------------------------------------------------*/
671/*---------------------------------------------------------------------------*/
672
673template <typename ConstituentCommandType, typename... RemainingArgs, typename Lambda>
674void operator<<(const GenericConstituentCommand<ConstituentCommandType, RemainingArgs...>& c, const Lambda& func)
675{
676 if constexpr (sizeof...(RemainingArgs) > 0) {
677 std::apply([&](auto... vs) {
678 impl::_applyConstituentCells(c.m_command.m_command, c.m_command.m_items, func, vs...);
679 },
680 c.m_remaining_args);
681 }
682 else
683 impl::_applyConstituentCells(c.m_command.m_command, c.m_command.m_items, func);
684}
685
686/*---------------------------------------------------------------------------*/
687/*---------------------------------------------------------------------------*/
688
689template <typename ConstituentItemType, typename ConstituentItemContainerType, typename... RemainingArgs> auto
690makeExtendedConstituentItemEnumeratorLoop(const ConstituentItemContainerType& container,
691 const RemainingArgs&... remaining_args)
692{
694 return GenericConstituentCommandArgs<TraitsType, RemainingArgs...>(TraitsType::createContainer(container), remaining_args...);
695}
696
697/*---------------------------------------------------------------------------*/
698/*---------------------------------------------------------------------------*/
699
700} // namespace Arcane::Accelerator::impl
701
702/*---------------------------------------------------------------------------*/
703/*---------------------------------------------------------------------------*/
704
705namespace Arcane::Accelerator
706{
707
708/*---------------------------------------------------------------------------*/
709/*---------------------------------------------------------------------------*/
710
711template <typename TraitsType, typename... RemainingArgs> auto
713{
714 using CommandType = typename TraitsType::CommandType;
715 using GenericCommandType = impl::GenericConstituentCommand<CommandType, RemainingArgs...>;
716 return GenericCommandType(CommandType::create(command, args.m_container), args.m_remaining_args);
717}
718
719/*---------------------------------------------------------------------------*/
720/*---------------------------------------------------------------------------*/
721
722// TODO: rendre obsolète (il faut utiliser la version générique)
723inline auto
724operator<<(RunCommand& command, const impl::MatAndGlobalCellRunCommand::Container& view)
725{
726 using CommandType = impl::MatAndGlobalCellRunCommand;
727 return impl::GenericConstituentCommand<CommandType>(CommandType::create(command, view));
728}
729
730/*---------------------------------------------------------------------------*/
731/*---------------------------------------------------------------------------*/
732
733// TODO: rendre obsolète (il faut utiliser la version générique)
734inline auto
735operator<<(RunCommand& command, const impl::EnvAndGlobalCellRunCommand::Container& view)
736{
737 using CommandType = impl::EnvAndGlobalCellRunCommand;
738 return impl::GenericConstituentCommand<CommandType>(CommandType::create(command, view));
739}
740
741/*---------------------------------------------------------------------------*/
742/*---------------------------------------------------------------------------*/
743
744// TODO: rendre obsolète (il faut utiliser la version générique)
745inline auto
746operator<<(RunCommand& command, const impl::EnvCellRunCommand::Container& view)
747{
748 using CommandType = impl::EnvCellRunCommand;
749 return impl::GenericConstituentCommand<CommandType>(CommandType::create(command, view));
750}
751
752/*---------------------------------------------------------------------------*/
753/*---------------------------------------------------------------------------*/
754
755// TODO: rendre obsolète (il faut utiliser la version générique)
756inline auto
757operator<<(RunCommand& command, const impl::MatCellRunCommand::Container& view)
758{
759 using CommandType = impl::MatCellRunCommand;
760 return impl::GenericConstituentCommand<CommandType>(CommandType::create(command, view));
761}
762
763/*---------------------------------------------------------------------------*/
764/*---------------------------------------------------------------------------*/
765
766} // End namespace Arcane::Accelerator
767
768/*---------------------------------------------------------------------------*/
769/*---------------------------------------------------------------------------*/
770
791#define RUNCOMMAND_MAT_ENUMERATE(ConstituentItemNameType, iter_name, env_or_mat_container, ...) \
792 A_FUNCINFO << ::Arcane::Accelerator::impl::makeExtendedConstituentItemEnumeratorLoop<ConstituentItemNameType>(env_or_mat_container __VA_OPT__(, __VA_ARGS__)) \
793 << [=] ARCCORE_HOST_DEVICE(::Arcane::Accelerator::impl::RunCommandConstituentItemEnumeratorTraitsT<ConstituentItemNameType>::IteratorValueType iter_name \
794 __VA_OPT__(ARCCORE_RUNCOMMAND_REMAINING_FOR_EACH(__VA_ARGS__)))
795
796/*---------------------------------------------------------------------------*/
797/*---------------------------------------------------------------------------*/
798
799#endif
Classes, Types et macros pour gérer la concurrence.
void _applyConstituentCells(RunCommand &command, ContainerType items, const Lambda &func, const RemainingArgs &... remaining_args)
Applique l'énumération func sur la liste d'entité items.
static ARCCORE_DEVICE void applyAtEnd(Int32 index, RemainingArgs &... remaining_args)
Applique les fonctors des arguments additionnels en fin de kernel.
static ARCCORE_DEVICE void applyAtBegin(Int32 index, RemainingArgs &... remaining_args)
Applique les fonctors des arguments additionnels en début de kernel.
Object temporaire pour conserver les informations d'exécution d'une commande et regrouper les tests.
void beginExecute()
Indique qu'on commence l'exécution de la commande.
void endExecute()
Signale la fin de l'exécution.
__host__ __device__ IteratorValueType operator[](Int32 i) const
Accesseur pour le i-ème élément de la liste.
constexpr __host__ __device__ IteratorValueType operator[](Int32 i) const
Accesseur pour le i-ème élément de la liste.
constexpr __host__ __device__ IteratorValueType operator[](Int32 i) const
Accesseur pour le i-ème élément de la liste.
Caractéristiques d'un énumérateur d'une commande sur les matériaux/milieux.
Classe de base des caractéristiques des commandes sur les constituants.
static void applyAtEnd(RemainingArgs &... remaining_args)
Applique les functors des arguments additionnels à la fin de l'itération.
static void applyAtBegin(RemainingArgs &... remaining_args)
Applique les functors des arguments additionnels au début de l'itération.
Vue sur une liste de mailles avec infos sur les milieux.
Maille arcane avec info matériaux et milieux.
Vue sur un vecteur sur les entités d'un composant.
Index d'une boucle accélérateur sur les matériaux ou milieux.
constexpr __host__ __device__ Int32 index() const
Index de l'itération courante.
constexpr __host__ __device__ CellLocalId globalCellId() const
Accesseur sur la partie cell local id.
constexpr __host__ __device__ Data operator()()
Cet opérateur permet de renvoyer le couple [ConstituentItemLocalIdType, CellLocalId].
constexpr __host__ __device__ ConstituentItemLocalIdType varIndex() const
Accesseur sur la partie MatVarIndex.
Maille arcane d'un milieu.
virtual EnvItemVectorView envView() const =0
Vue associée à ce milieu.
Interface d'un matériau d'un maillage.
virtual MatItemVectorView matView() const =0
Vue associée à ce matériau.
Représente un matériau d'une maille multi-matériau.
Représente un index sur les variables matériaux et milieux.
Vue d'un tableau d'éléments de type T.
Definition Span.h:801
void arcaneParallelFor(Integer i0, Integer size, InstanceType *itype, void(InstanceType::*lambda_function)(Integer i0, Integer size))
Applique en concurrence la fonction lambda lambda_function sur l'intervalle d'itération [i0,...
Espace de nom pour l'utilisation des accélérateurs.
eExecutionPolicy
Politique d'exécution pour un Runner.
@ SYCL
Politique d'exécution utilisant l'environnement SYCL.
@ HIP
Politique d'exécution utilisant l'environnement HIP.
@ CUDA
Politique d'exécution utilisant l'environnement CUDA.
@ Sequential
Politique d'exécution séquentielle.
@ Thread
Politique d'exécution multi-thread.
Active toujours les traces dans les parties Arcane concernant les matériaux.
ConstituentAndGlobalCellIteratorValue< EnvItemLocalId > EnvAndGlobalCellIteratorValue
Type de la valeur de l'itérateur pour RUNCOMMAND_MAT_ENUMERATE(EnvAndGlobalCell,.....
ConstituentAndGlobalCellIteratorValue< MatItemLocalId > MatAndGlobalCellIteratorValue
Type de la valeur de l'itérateur pour RUNCOMMAND_MAT_ENUMERATE(MatAndGlobalCell,.....
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
std::int32_t Int32
Type entier signé sur 32 bits.