Arcane  v4.1.1.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
AcceleratorGlobal.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2025 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/* AcceleratorGlobal.cc (C) 2000-2025 */
9/* */
10/* Déclarations générales pour le support des accélérateurs. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arccore/accelerator/AcceleratorGlobal.h"
15
16// Les fichiers suivants servent à tester que tout compile bien
17#include "arccore/accelerator/Atomic.h"
18#include "arccore/accelerator/LocalMemory.h"
20#include "arccore/accelerator/GenericFilterer.h"
21#include "arccore/accelerator/GenericPartitioner.h"
22#include "arccore/accelerator/GenericReducer.h"
23#include "arccore/accelerator/GenericScanner.h"
24#include "arccore/accelerator/GenericSorter.h"
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
34
40
41/*---------------------------------------------------------------------------*/
42/*---------------------------------------------------------------------------*/
43
44Arcane::String Arcane::Accelerator::impl::
45getBadPolicyMessage(eExecutionPolicy policy)
46{
47 switch (policy) {
48 case eExecutionPolicy::CUDA:
49 return "Requesting CUDA kernel execution but the kernel is not compiled with CUDA."
50 " You need to compile the file containing this kernel with CUDA compiler.";
51 case eExecutionPolicy::HIP:
52 return "Requesting HIP kernel execution but the kernel is not compiled with HIP."
53 " You need to compile the file containing this kernel with HIP compiler.";
54 case eExecutionPolicy::SYCL:
55 return "Requesting SYCL kernel execution but the kernel is not compiled with SYCL."
56 " You need to compile the file containing this kernel with SYCL compiler.";
57 default:
58 break;
59 }
60 return String::format("Invalid execution policy '{0}'", policy);
61}
62
63/*---------------------------------------------------------------------------*/
64/*---------------------------------------------------------------------------*/
Types et fonctions pour gérer les synchronisations sur les accélérateurs.
Chaîne de caractères unicode.