Alien  1.3.0
Developer documentation
Loading...
Searching...
No Matches
SYCLParallelEngine.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 * Copyright 2020 IFPEN-CEA
9 *
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
13 *
14 * http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
21 *
22 * SPDX-License-Identifier: Apache-2.0
23 */
24
25#include <cassert>
26
27#include <alien/kernels/sycl/SYCLBackEnd.h>
28#include <alien/kernels/sycl/SYCLPrecomp.h>
29
30#include "SYCLEnv.h"
31#include "SYCLParallelEngine.h"
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
35
36using namespace Arccore;
37
38namespace Alien
39{
40
41 namespace SYCLInternal
42 {
43 struct EngineInternal
44 {
45 EngineInternal()
46 {
47 m_env = SYCLEnv::instance() ;
48 }
49 SYCLEnv* m_env = nullptr ;
50 };
51 }
52
53 SYCLParallelEngine::SYCLParallelEngine()
54 {
55 m_internal.reset(new SYCLInternal::EngineInternal()) ;
56 }
57
58 SYCLParallelEngine::~SYCLParallelEngine()
59 {
60 //delete m_internal ;
61 }
62
63 std::size_t SYCLParallelEngine::maxNumThreads() const {
64 return m_internal->m_env->maxNumThreads() ;
65 }
66
67/*---------------------------------------------------------------------------*/
68
69} // namespace Alien
70
71/*---------------------------------------------------------------------------*/
72/*---------------------------------------------------------------------------*/
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Definition BackEnd.h:17