Types and macros to manage enumerations of materials and media on accelerators. More...
#include "arcane/core/Concurrency.h"#include "arcane/core/materials/ComponentItemVectorView.h"#include "arcane/core/materials/MaterialsCoreGlobal.h"#include "arcane/core/materials/MatItem.h"#include "arcane/core/materials/MatItemEnumerator.h"#include "arcane/core/materials/ConstituentItemIndexedSelectionView.h"#include "arcane/accelerator/KernelLauncher.h"#include "arcane/accelerator/RunCommand.h"#include "arcane/accelerator/RunCommandLaunchInfo.h"#include "arccore/common/HostKernelRemainingArgsHelper.h"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::Materials |
| Always enables tracing in Arcane parts concerning materials. | |
| namespace | Arcane::Accelerator |
| Namespace for accelerator usage. | |
Macros | |
| #define | A_RUNCOMMAND_MAT_ENUMERATE_BUILDER_HELPER(ConstituentItemNameType, env_or_mat_container, ...) |
| #define | RUNCOMMAND_MAT_ENUMERATE(ConstituentItemNameType, iter_name, env_or_mat_container, ...) |
| Macro for iterating over a material or an environment. | |
Functions | |
| template<typename ContainerType, typename Lambda, typename... RemainingArgs> | |
| void | Arcane::Accelerator::Impl::_doConstituentItemsLambda (Int32 base_index, Int32 size, ContainerType items, const Lambda &func, RemainingArgs... remaining_args) |
| template<typename ContainerType, typename Lambda, typename... RemainingArgs> | |
| void | Arcane::Accelerator::Impl::_applyConstituentCells (RunCommand &command, ContainerType items, const Lambda &func, const RemainingArgs &... remaining_args) |
| Applies the enumeration func over the entity list items. | |
| template<typename ConstituentCommandType, typename... RemainingArgs, typename Lambda> | |
| void | Arcane::Accelerator::Impl::operator<< (const GenericConstituentCommand< ConstituentCommandType, RemainingArgs... > &c, const Lambda &func) |
| template<typename ConstituentItemType, typename ConstituentItemContainerType, typename... RemainingArgs> | |
| auto | Arcane::Accelerator::Impl::makeExtendedConstituentItemEnumeratorLoop (ConstituentItemType x, const ConstituentItemContainerType &container, const RemainingArgs &... remaining_args) |
| Accelerator::Impl::EnvAndGlobalCellRunCommandContainer | Arcane::Materials::arcaneCreateRunCommandMaterialContainer (Arcane::Materials::EnvAndGlobalCell, Arcane::Materials::IMeshEnvironment *env) |
| Specialization for a view on an environment and the associated global cell. | |
| Accelerator::Impl::EnvAndGlobalCellRunCommandContainer | Arcane::Materials::arcaneCreateRunCommandMaterialContainer (Arcane::Materials::EnvAndGlobalCell, Arcane::Materials::EnvCellVectorView view) |
| Accelerator::Impl::MatAndGlobalCellRunCommandContainer | Arcane::Materials::arcaneCreateRunCommandMaterialContainer (MatAndGlobalCell, IMeshMaterial *mat) |
| Specialization for a view on a material and the associated global cell. | |
| Accelerator::Impl::MatAndGlobalCellRunCommandContainer | Arcane::Materials::arcaneCreateRunCommandMaterialContainer (MatAndGlobalCell, MatCellVectorView mat) |
| Accelerator::Impl::AllEnvCellRunCommandContainer | Arcane::Materials::arcaneCreateRunCommandMaterialContainer (AllEnvCell, AllEnvCellVectorView items) |
| Specialization for a view on AllEnvCell. | |
| Accelerator::Impl::EnvCellRunCommandContainer | Arcane::Materials::arcaneCreateRunCommandMaterialContainer (EnvCell, IMeshEnvironment *env) |
| Specialization for a view on an environment. | |
| Accelerator::Impl::EnvCellRunCommandContainer | Arcane::Materials::arcaneCreateRunCommandMaterialContainer (EnvCell, EnvCellVectorView view) |
| Accelerator::Impl::MatCellRunCommandContainer | Arcane::Materials::arcaneCreateRunCommandMaterialContainer (MatCell, IMeshMaterial *mat) |
| Specialization for a view on a material. | |
| Accelerator::Impl::MatCellRunCommandContainer | Arcane::Materials::arcaneCreateRunCommandMaterialContainer (MatCell, MatCellVectorView view) |
| Accelerator::Impl::EnvIndexedSelectionRunCommandContainer | Arcane::Materials::arcaneCreateRunCommandMaterialContainer (EnvCell, EnvCellVectorSelectionView view) |
| template<typename TraitsType, typename... RemainingArgs> | |
| auto | Arcane::Accelerator::operator<< (RunCommand &command, const Impl::GenericConstituentCommandArgs< TraitsType, RemainingArgs... > &args) |
| auto | Arcane::Accelerator::operator<< (RunCommand &command, const Impl::MatAndGlobalCellRunCommandContainer &view) |
| auto | Arcane::Accelerator::operator<< (RunCommand &command, const Impl::EnvAndGlobalCellRunCommandContainer &view) |
| auto | Arcane::Accelerator::operator<< (RunCommand &command, const Impl::EnvCellRunCommandContainer &view) |
| auto | Arcane::Accelerator::operator<< (RunCommand &command, const Impl::MatCellRunCommandContainer &view) |
Types and macros to manage enumerations of materials and media on accelerators.
Definition in file RunCommandMaterialEnumerate.h.
| #define A_RUNCOMMAND_MAT_ENUMERATE_BUILDER_HELPER | ( | ConstituentItemNameType, | |
| env_or_mat_container, | |||
| ... ) |
Definition at line 744 of file RunCommandMaterialEnumerate.h.
| #define RUNCOMMAND_MAT_ENUMERATE | ( | ConstituentItemNameType, | |
| iter_name, | |||
| env_or_mat_container, | |||
| ... ) |
Macro for iterating over a material or an environment.
| ConstituentItemNameType | is the enumerator type. |
| iter_name | is the iterator name |
| env_or_mat_container | is the container being iterated over. |
Additional parameters are used for reductions (see Reductions)
ConstituentItemNameType must be one of the following values:
See Usage for materials for more information.
Definition at line 767 of file RunCommandMaterialEnumerate.h.
| using Arcane::Accelerator::Impl::EnvAndGlobalCellRunCommandContainer = ConstituentAndGlobalCellRunCommandContainer<Arcane::Materials::EnvItemLocalId, Arcane::Materials::EnvCellVectorView> |
Definition at line 321 of file RunCommandMaterialEnumerate.h.
| using Arcane::Accelerator::Impl::EnvCellRunCommandContainer = ConstituentRunCommandContainer<Arcane::Materials::EnvItemLocalId, Arcane::Materials::EnvCellVectorView> |
Definition at line 281 of file RunCommandMaterialEnumerate.h.
| using Arcane::Accelerator::Impl::EnvIndexedSelectionRunCommandContainer = ConstituentIndexedSelectionRunCommandContainer<Arcane::Materials::EnvItemLocalId, Arcane::Materials::EnvCellVectorSelectionView> |
Definition at line 366 of file RunCommandMaterialEnumerate.h.
| using Arcane::Accelerator::Impl::MatAndGlobalCellRunCommandContainer = ConstituentAndGlobalCellRunCommandContainer<Arcane::Materials::MatItemLocalId, Arcane::Materials::MatCellVectorView> |
Definition at line 322 of file RunCommandMaterialEnumerate.h.
| using Arcane::Accelerator::Impl::MatCellRunCommandContainer = ConstituentRunCommandContainer<Arcane::Materials::MatItemLocalId, Arcane::Materials::MatCellVectorView> |
Definition at line 282 of file RunCommandMaterialEnumerate.h.
| void Arcane::Accelerator::Impl::_applyConstituentCells | ( | RunCommand & | command, |
| ContainerType | items, | ||
| const Lambda & | func, | ||
| const RemainingArgs &... | remaining_args ) |
Applies the enumeration func over the entity list items.
The container can come from:
Definition at line 512 of file RunCommandMaterialEnumerate.h.
References Arcane::arcaneParallelFor(), ARCCORE_FATAL, Arcane::Accelerator::Impl::RunCommandLaunchInfo::beginExecute(), Arcane::Accelerator::CUDA, Arcane::Accelerator::Impl::RunCommandLaunchInfo::endExecute(), Arcane::Accelerator::HIP, Arcane::Accelerator::Sequential, Arcane::Accelerator::SYCL, and Arcane::Accelerator::Thread.
| void Arcane::Accelerator::Impl::_doConstituentItemsLambda | ( | Int32 | base_index, |
| Int32 | size, | ||
| ContainerType | items, | ||
| const Lambda & | func, | ||
| RemainingArgs... | remaining_args ) |
Definition at line 433 of file RunCommandMaterialEnumerate.h.
| auto Arcane::Accelerator::Impl::makeExtendedConstituentItemEnumeratorLoop | ( | ConstituentItemType | x, |
| const ConstituentItemContainerType & | container, | ||
| const RemainingArgs &... | remaining_args ) |
Definition at line 570 of file RunCommandMaterialEnumerate.h.
| void Arcane::Accelerator::Impl::operator<< | ( | const GenericConstituentCommand< ConstituentCommandType, RemainingArgs... > & | c, |
| const Lambda & | func ) |
Definition at line 554 of file RunCommandMaterialEnumerate.h.