Arcane  v4.1.4.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
RunCommandLaunch.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 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/* RunCommandLaunch.cc (C) 2000-2026 */
9/* */
10/* RunCommand pour le parallélisme hiérarchique. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
15
16/*---------------------------------------------------------------------------*/
17/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27namespace Arcane
28{
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
33namespace Accelerator::Impl
34{
35
36/*---------------------------------------------------------------------------*/
37/*---------------------------------------------------------------------------*/
38
39template <typename IndexType_> ARCCORE_ACCELERATOR_EXPORT HostLaunchLoopRangeBase<IndexType_>::
40HostLaunchLoopRangeBase(IndexType total_size, Int32 nb_block, Int32 block_size)
41: m_total_size(total_size)
42, m_nb_block(nb_block)
43, m_block_size(block_size)
44{
45 m_last_block_size = static_cast<Int32>((total_size - (block_size * (nb_block - 1))));
46 if (m_last_block_size <= 0)
47 ARCCORE_FATAL("Bad value '{0}' for last group size", m_last_block_size);
48}
49
50/*---------------------------------------------------------------------------*/
51/*---------------------------------------------------------------------------*/
52
53template class HostLaunchLoopRangeBase<Int32>;
54template class HostLaunchLoopRangeBase<Int64>;
55
56/*---------------------------------------------------------------------------*/
57/*---------------------------------------------------------------------------*/
58
59} // namespace Accelerator::Impl
60
61/*---------------------------------------------------------------------------*/
62/*---------------------------------------------------------------------------*/
63
64} // namespace Arcane
65
66/*---------------------------------------------------------------------------*/
67/*---------------------------------------------------------------------------*/
#define ARCCORE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Types et macros pour gérer le parallélisme hiérarchique sur les accélérateurs.
Informations d'une boucle utilisant le parallélisme hiérarchique sur l'hôte.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
std::int32_t Int32
Type entier signé sur 32 bits.