Types et macros pour gérer les boucles sur les accélérateurs. Plus de détails...
#include "arcane/utils/ConcurrencyUtils.h"#include "arcane/accelerator/core/RunCommand.h"#include "arcane/accelerator/KernelLauncher.h"
Graphe des dépendances par inclusion de RunCommandLoop.h:
Ce graphe montre quels fichiers incluent directement ou indirectement ce fichier :Aller au code source de ce fichier.
Classes | |
| class | Arcane::Accelerator::impl::ArrayBoundRunCommand< LoopBoundType, RemainingArgs > |
| Classe pour conserver les arguments d'une RunCommand. Plus de détails... | |
| class | Arcane::Accelerator::impl::ExtendedArrayBoundLoop< LoopBoundType, RemainingArgs > |
| Classe pour gérer les paramètres supplémentaires des commandes. Plus de détails... | |
Espaces de nommage | |
| namespace | Arcane |
| -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*- | |
| namespace | Arcane::Accelerator |
| Espace de nom pour l'utilisation des accélérateurs. | |
Macros | |
| #define | RUNCOMMAND_LOOP(iter_name, bounds, ...) |
| Boucle sur accélérateur. | |
| #define | RUNCOMMAND_LOOPN(iter_name, N, ...) |
| Boucle sur accélérateur. | |
| #define | RUNCOMMAND_LOOP2(iter_name, x1, x2) |
| Boucle 2D sur accélérateur. | |
| #define | RUNCOMMAND_LOOP3(iter_name, x1, x2, x3) |
| Boucle 3D sur accélérateur. | |
| #define | RUNCOMMAND_LOOP4(iter_name, x1, x2, x3, x4) |
| Boucle 4D sur accélérateur. | |
| #define | RUNCOMMAND_LOOP1(iter_name, x1, ...) |
| Boucle 1D sur accélérateur avec arguments supplémentaires. | |
| #define | RUNCOMMAND_SINGLE(...) |
| Boucle sur accélérateur pour exécution avec un seul thread. | |
Fonctions | |
| template<typename LoopBoundType, typename Lambda, typename... RemainingArgs> | |
| void | Arcane::Accelerator::impl::_applyGenericLoop (RunCommand &command, LoopBoundType bounds, const Lambda &func, const RemainingArgs &... other_args) |
| Applique la lambda func sur une boucle bounds. | |
| template<typename LoopBoundType, typename... RemainingArgs> | |
| auto | Arcane::Accelerator::impl::makeExtendedArrayBoundLoop (const LoopBoundType &bounds, RemainingArgs... args) -> ExtendedArrayBoundLoop< LoopBoundType, RemainingArgs... > |
| template<typename LoopBoundType, typename... RemainingArgs> | |
| auto | Arcane::Accelerator::impl::makeExtendedLoop (const LoopBoundType &bounds, RemainingArgs... args) -> ExtendedArrayBoundLoop< LoopBoundType, RemainingArgs... > |
| template<typename LoopBoundType, typename Lambda, typename... RemainingArgs> | |
| void | Arcane::Accelerator::impl::runExtended (RunCommand &command, LoopBoundType bounds, const Lambda &func, const std::tuple< RemainingArgs... > &other_args) |
| Applique la lambda func sur l'intervalle d'itération donnée par bounds. | |
| template<typename ExtentType, typename Lambda> | |
| void | Arcane::Accelerator::run (RunCommand &command, ArrayBounds< ExtentType > bounds, const Lambda &func) |
| Applique la lambda func sur l'intervalle d'itération donnée par bounds. | |
| template<int N, typename Lambda> | |
| void | Arcane::Accelerator::run (RunCommand &command, SimpleForLoopRanges< N, Int32 > bounds, const Lambda &func) |
| Applique la lambda func sur l'intervalle d'itération donnée par bounds. | |
| template<int N, typename Lambda> | |
| void | Arcane::Accelerator::run (RunCommand &command, ComplexForLoopRanges< N, Int32 > bounds, const Lambda &func) |
| Applique la lambda func sur l'intervalle d'itération donnée par bounds. | |
| template<typename ExtentType> | |
| auto | Arcane::Accelerator::operator<< (RunCommand &command, const ArrayBounds< ExtentType > &bounds) -> impl::ArrayBoundRunCommand< SimpleForLoopRanges< ExtentType::rank(), Int32 > > |
| template<typename LoopBoundType, typename... RemainingArgs> | |
| auto | Arcane::Accelerator::operator<< (RunCommand &command, const impl::ExtendedArrayBoundLoop< LoopBoundType, RemainingArgs... > &ex_loop) -> impl::ArrayBoundRunCommand< LoopBoundType, RemainingArgs... > |
| template<int N> | |
| impl::ArrayBoundRunCommand< SimpleForLoopRanges< N > > | Arcane::Accelerator::operator<< (RunCommand &command, const SimpleForLoopRanges< N, Int32 > &bounds) |
| template<int N> | |
| impl::ArrayBoundRunCommand< ComplexForLoopRanges< N > > | Arcane::Accelerator::operator<< (RunCommand &command, const ComplexForLoopRanges< N, Int32 > &bounds) |
| template<typename LoopBoundType, typename Lambda, typename... RemainingArgs> | |
| void | Arcane::Accelerator::impl::operator<< (ArrayBoundRunCommand< LoopBoundType, RemainingArgs... > &&nr, const Lambda &f) |
Types et macros pour gérer les boucles sur les accélérateurs.
Définition dans le fichier RunCommandLoop.h.
| #define RUNCOMMAND_LOOP | ( | iter_name, | |
| bounds, | |||
| ... ) |
Boucle sur accélérateur.
Définition à la ligne 254 du fichier RunCommandLoop.h.
| #define RUNCOMMAND_LOOP1 | ( | iter_name, | |
| x1, | |||
| ... ) |
Boucle 1D sur accélérateur avec arguments supplémentaires.
Cette macro permet d'ajouter des arguments. Ces arguments peuvent être des valeurs à réduire (telles que les classes Arcane::Accelerator::ReducerSum2, Arcane::Accelerator::ReducerMax2 ou Arcane::Accelerator::ReducerMin2) ou des données en mémoire locale (via la classe Arcane::Accelerator::RunCommandLocalMemory).
Définition à la ligne 282 du fichier RunCommandLoop.h.
Référencé par Arcane::Accelerator::impl::AcceleratorSpecificMemoryCopy< DataType, Extent >::_fill(), et Arcane::Accelerator::impl::GenericPartitionerIf::apply().
| #define RUNCOMMAND_LOOP2 | ( | iter_name, | |
| x1, | |||
| x2 ) |
Boucle 2D sur accélérateur.
Définition à la ligne 263 du fichier RunCommandLoop.h.
| #define RUNCOMMAND_LOOP3 | ( | iter_name, | |
| x1, | |||
| x2, | |||
| x3 ) |
Boucle 3D sur accélérateur.
Définition à la ligne 267 du fichier RunCommandLoop.h.
| #define RUNCOMMAND_LOOP4 | ( | iter_name, | |
| x1, | |||
| x2, | |||
| x3, | |||
| x4 ) |
Boucle 4D sur accélérateur.
Définition à la ligne 271 du fichier RunCommandLoop.h.
| #define RUNCOMMAND_LOOPN | ( | iter_name, | |
| N, | |||
| ... ) |
Boucle sur accélérateur.
Définition à la ligne 259 du fichier RunCommandLoop.h.
| #define RUNCOMMAND_SINGLE | ( | ... | ) |
Boucle sur accélérateur pour exécution avec un seul thread.
Définition à la ligne 289 du fichier RunCommandLoop.h.
| void Arcane::Accelerator::impl::_applyGenericLoop | ( | RunCommand & | command, |
| LoopBoundType | bounds, | ||
| const Lambda & | func, | ||
| const RemainingArgs &... | other_args ) |
Applique la lambda func sur une boucle bounds.
La lambda func est appliqué à la commande command. bound est le type de la boucle. Les types supportés sont:
Les arguments supplémentaires other_args sont utilisés pour supporter des fonctionnalités telles que les réductions (ReducerSum2, ReducerMax2, ...) ou la gestion de la mémoire locale (via LocalMemory).
Définition à la ligne 45 du fichier RunCommandLoop.h.
Références ARCANE_FATAL, Arcane::Accelerator::Impl::RunCommandLaunchInfo::beginExecute(), Arcane::Accelerator::CUDA, Arcane::Accelerator::Impl::RunCommandLaunchInfo::endExecute(), Arcane::Accelerator::HIP, Arcane::Accelerator::Impl::RunCommandLaunchInfo::loopRunInfo(), Arcane::Accelerator::Sequential, Arcane::Accelerator::SYCL, et Arcane::Accelerator::Thread.
| auto Arcane::Accelerator::impl::makeExtendedArrayBoundLoop | ( | const LoopBoundType & | bounds, |
| RemainingArgs... | args ) -> ExtendedArrayBoundLoop<LoopBoundType, RemainingArgs...> |
Définition à la ligne 125 du fichier RunCommandLoop.h.
| auto Arcane::Accelerator::impl::makeExtendedLoop | ( | const LoopBoundType & | bounds, |
| RemainingArgs... | args ) -> ExtendedArrayBoundLoop<LoopBoundType, RemainingArgs...> |
Définition à la ligne 132 du fichier RunCommandLoop.h.
|
inline |
Définition à la ligne 235 du fichier RunCommandLoop.h.
| void Arcane::Accelerator::impl::runExtended | ( | RunCommand & | command, |
| LoopBoundType | bounds, | ||
| const Lambda & | func, | ||
| const std::tuple< RemainingArgs... > & | other_args ) |
Applique la lambda func sur l'intervalle d'itération donnée par bounds.
other_args contient les éventuels arguments supplémentaires passés à la lambda.
Définition à la ligne 147 du fichier RunCommandLoop.h.