Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
AcceleratorGlobal.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/* AcceleratorGlobal.cc (C) 2000-2026 */
9/* */
10/* General declarations for accelerator support. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arccore/accelerator/AcceleratorGlobal.h"
15
16// The following files are used to test that everything compiles correctly
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/*---------------------------------------------------------------------------*/
29
30/*!
31 * \file RunCommandLoop.h
32 *
33 * \brief Types and macros for managing loops on accelerators
34 */
35
36/*!
37 * \file Reduce.h
38 *
39 * \brief Types and functions for managing synchronizations on accelerators
40 */
41
42/*---------------------------------------------------------------------------*/
43/*---------------------------------------------------------------------------*/
44
45Arcane::String Arcane::Accelerator::Impl::
46getBadPolicyMessage(eExecutionPolicy policy)
47{
48 switch (policy) {
49 case eExecutionPolicy::CUDA:
50 return "Requesting CUDA kernel execution but the kernel is not compiled with CUDA."
51 " You need to compile the file containing this kernel with CUDA compiler.";
52 case eExecutionPolicy::HIP:
53 return "Requesting HIP kernel execution but the kernel is not compiled with HIP."
54 " You need to compile the file containing this kernel with HIP compiler.";
55 case eExecutionPolicy::SYCL:
56 return "Requesting SYCL kernel execution but the kernel is not compiled with SYCL."
57 " You need to compile the file containing this kernel with SYCL compiler.";
58 default:
59 break;
60 }
61 return String::format("Invalid execution policy '{0}'", policy);
62}
63
64/*---------------------------------------------------------------------------*/
65/*---------------------------------------------------------------------------*/
Types and functions for managing synchronizations on accelerators.