Types and macros to manage enumerations of entities on accelerators. More...
#include "arccore/common/accelerator/RunCommand.h"#include "arcane/accelerator/KernelLauncher.h"#include "arcane/core/ItemTypes.h"#include "arcane/core/ItemGroup.h"#include "arcane/core/Concurrency.h"#include "arccore/common/HostKernelRemainingArgsHelper.h"#include <concepts>Go to the source code of this file.
Namespaces | |
| namespace | Arcane |
| -- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -- | |
| namespace | Arcane::Accelerator |
| Namespace for accelerator usage. | |
Concepts | |
| concept | Arcane::Accelerator::impl::RunCommandEnumerateIteratorConcept |
| Concept to constrain values in RUNCOMMAND_ENUMERATE. | |
Macros | |
| #define | RUNCOMMAND_ENUMERATE(ItemTypeName, iter_name, item_group, ...) |
| Macro to iterate over an accelerator on a group of entities. | |
Functions | |
| template<typename TraitsType, typename ContainerType, typename Lambda, typename... RemainingArgs> | |
| void | Arcane::Accelerator::impl::_doItemsLambda (Int32 base_index, ContainerType sub_items, const Lambda &func, RemainingArgs... remaining_args) |
| template<typename TraitsType, typename Lambda, typename... RemainingArgs> | |
| void | Arcane::Accelerator::impl::_applyItems (RunCommand &command, typename TraitsType::ContainerType items, const Lambda &func, const RemainingArgs &... remaining_args) |
| Applies the enumeration func on the entity list items. | |
| template<typename TraitsType, typename Lambda> | |
| void | Arcane::Accelerator::run (RunCommand &command, const TraitsType &traits, const Lambda &func) |
| template<typename ItemType> | |
| auto | Arcane::Accelerator::operator<< (RunCommand &command, const impl::RunCommandItemEnumeratorTraitsT< ItemType > &traits) |
| template<typename ItemType> | |
| auto | Arcane::Accelerator::operator<< (RunCommand &command, const ItemVectorViewT< ItemType > &items) |
| template<typename ItemType> | |
| auto | Arcane::Accelerator::operator<< (RunCommand &command, const ItemGroupT< ItemType > &items) |
| template<typename TraitsType, typename Lambda> | |
| void | Arcane::Accelerator::operator<< (ItemRunCommand< TraitsType > &nr, const Lambda &f) |
| template<typename TraitsType, typename... RemainingArgs> | |
| auto | Arcane::Accelerator::operator<< (RunCommand &command, const impl::ItemRunCommandArgs< TraitsType, RemainingArgs... > &args) |
| template<typename TraitsType, typename Lambda, typename... RemainingArgs> | |
| void | Arcane::Accelerator::operator<< (ItemRunCommand< TraitsType, RemainingArgs... > &&nr, const Lambda &f) |
| template<typename ItemTypeName, typename ItemContainerType, typename... RemainingArgs> | |
| auto | Arcane::Accelerator::impl::makeExtendedItemEnumeratorLoop (const ItemContainerType &container_type, const RemainingArgs &... remaining_args) |
Types and macros to manage enumerations of entities on accelerators.
Definition in file RunCommandEnumerate.h.
| #define RUNCOMMAND_ENUMERATE | ( | ItemTypeName, | |
| iter_name, | |||
| item_group, | |||
| ... ) |
Macro to iterate over an accelerator on a group of entities.
Conceptually, this is equivalent to the following loop:
ItemTypeName must be a local ID type (CellLocalId, NodeLocalId). Using the entity type name (Cell, Node, ...) is possible but is obsolete and is equivalent to using the local ID type (for example, you must replace Cell with CellLocalId). iter_name is the name of the variable containing the current iterator value. item_group is the name of the ItemGroup or ItemVectorView associated Additional arguments are used to specify potential reductions
Definition at line 626 of file RunCommandEnumerate.h.
| void Arcane::Accelerator::impl::_applyItems | ( | RunCommand & | command, |
| typename TraitsType::ContainerType | items, | ||
| const Lambda & | func, | ||
| const RemainingArgs &... | remaining_args ) |
Applies the enumeration func on the entity list items.
Definition at line 409 of file RunCommandEnumerate.h.
References Arcane::arcaneParallelForeach(), ARCCORE_FATAL, Arcane::Accelerator::Impl::RunCommandLaunchInfo::beginExecute(), Arcane::Accelerator::CUDA, Arcane::Accelerator::Impl::RunCommandLaunchInfo::endExecute(), Arcane::Accelerator::HIP, Arcane::Accelerator::RunCommand::nbStride(), Arcane::Accelerator::Sequential, Arcane::Accelerator::SYCL, and Arcane::Accelerator::Thread.
| void Arcane::Accelerator::impl::_doItemsLambda | ( | Int32 | base_index, |
| ContainerType | sub_items, | ||
| const Lambda & | func, | ||
| RemainingArgs... | remaining_args ) |
Definition at line 386 of file RunCommandEnumerate.h.
| auto Arcane::Accelerator::impl::makeExtendedItemEnumeratorLoop | ( | const ItemContainerType & | container_type, |
| const RemainingArgs &... | remaining_args ) |
Definition at line 592 of file RunCommandEnumerate.h.