Alien  1.3.0
Developer documentation
Loading...
Searching...
No Matches
SYCLEnv.h
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 * SYCLEnv.h
9 *
10 * Created on: Nov 26, 2021
11 * Author: gratienj
12 */
13
14#pragma once
15
16namespace Alien
17{
18namespace SYCLInternal
19{
20 struct EnvInternal;
21}
22
23class ALIEN_EXPORT SYCLEnv
24{
25 public:
26 static SYCLEnv* m_instance;
27 static SYCLEnv* instance();
28 static SYCLEnv* instance(int device_id);
29
30 SYCLEnv();
31
32 SYCLEnv(int device_id);
33
34 virtual ~SYCLEnv();
35
37 {
38 return m_internal.get();
39 }
40
41 int deviceId();
42
43 std::size_t maxNumGroups();
44
45 std::size_t maxWorkGroupSize();
46
47 std::size_t maxNumThreads();
48
49 private:
50 std::unique_ptr<SYCLInternal::EnvInternal> m_internal ;
51};
52} // namespace Alien
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Definition BackEnd.h:17