Eigenvalue SoLvers for Petaflop-Applications (ELPA) 2024.03.001
Loading...
Searching...
No Matches
syclCommon.hpp
Go to the documentation of this file.
1// This file is part of ELPA.
2//
3// The ELPA library was originally created by the ELPA consortium,
4// consisting of the following organizations:
5//
6// - Max Planck Computing and Data Facility (MPCDF), formerly known as
7// Rechenzentrum Garching der Max-Planck-Gesellschaft (RZG),
8// - Bergische Universität Wuppertal, Lehrstuhl für angewandte
9// Informatik,
10// - Technische Universität München, Lehrstuhl für Informatik mit
11// Schwerpunkt Wissenschaftliches Rechnen ,
12// - Fritz-Haber-Institut, Berlin, Abt. Theorie,
13// - Max-Plack-Institut für Mathematik in den Naturwissenschaften,
14// Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition,
15// and
16// - IBM Deutschland GmbH
17//
18// This particular source code file contains additions, changes and
19// enhancements authored by Intel Corporation which is not part of
20// the ELPA consortium.
21//
22// More information can be found here:
23// http://elpa.mpcdf.mpg.de/
24//
25// ELPA is free software: you can redistribute it and/or modify
26// it under the terms of the version 3 of the license of the
27// GNU Lesser General Public License as published by the Free
28// Software Foundation.
29//
30// ELPA is distributed in the hope that it will be useful,
31// but WITHOUT ANY WARRANTY; without even the implied warranty of
32// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33// GNU Lesser General Public License for more details.
34//
35// You should have received a copy of the GNU Lesser General Public License
36// along with ELPA. If not, see <http://www.gnu.org/licenses/>
37//
38// ELPA reflects a substantial effort on the part of the original
39// ELPA consortium, and we ask you to respect the spirit of the
40// license that we chose: i.e., please contribute any changes you
41// may have back to the original ELPA library distribution, and keep
42// any derivatives of ELPA under the same license that we chose for
43// the original distribution, the GNU Lesser General Public License.
44//
45// This file was written by A. Poeppl, Intel Corporation (2022) for MPCDF
46
47#ifndef SYCL_COMMON_HPP
48#define SYCL_COMMON_HPP
49
50#pragma once
51
52#include <CL/sycl.hpp>
53
54namespace elpa {
55namespace gpu {
56namespace sycl {
57
58 void collectGpuDevices(bool onlyGpus);
59 void collectCpuDevices();
60 void printGpuInfo();
61 int selectGpuDevice(int deviceNum);
62 int selectCpuDevice(int deviceNum);
64 size_t getNumDevices();
65 size_t getNumCpuDevices();
66 cl::sycl::device getDevice();
67 cl::sycl::queue & getQueue();
68
69}
70}
71}
72#endif
int selectCpuDevice(int deviceNum)
Definition syclCommon.cpp:128
void printGpuInfo()
Definition syclCommon.cpp:164
int selectGpuDevice(int deviceNum)
Definition syclCommon.cpp:114
cl::sycl::device getDevice()
Definition syclCommon.cpp:148
cl::sycl::queue & getQueue()
Definition syclCommon.cpp:141
void collectCpuDevices()
Definition syclCommon.cpp:88
void selectDefaultGpuDevice()
Definition syclCommon.cpp:134
size_t getNumCpuDevices()
Definition syclCommon.cpp:159
size_t getNumDevices()
Definition syclCommon.cpp:155
void collectGpuDevices(bool onlyGpus)
Definition syclCommon.cpp:63
Definition syclCommon.hpp:54