Arcane  v4.1.0.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
WorkGroupLoopRange.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2024 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/* WorkGroupLoopRange.cc (C) 2000-2025 */
9/* */
10/* Boucle pour le parallélisme hiérarchique. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/accelerator/WorkGroupLoopRange.h"
15
16/*---------------------------------------------------------------------------*/
17/*---------------------------------------------------------------------------*/
18
19namespace Arcane::Accelerator
20{
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25WorkGroupLoopRange::
26WorkGroupLoopRange(Int32 total_size, Int32 nb_group, Int32 block_size)
27: m_total_size(total_size)
28, m_nb_group(nb_group)
29, m_group_size(block_size)
30{
31 m_last_group_size = (total_size - (block_size * (nb_group - 1)));
32}
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
37} // namespace Arcane::Accelerator
38
39/*---------------------------------------------------------------------------*/
40/*---------------------------------------------------------------------------*/
Espace de nom pour l'utilisation des accélérateurs.
std::int32_t Int32
Type entier signé sur 32 bits.